Standard

useful bash commands and constructs

  • create files with spaces using xargs:
    ls /your/dir | tr -d "'" | xargs -t -I {} touch "{}"
  • send notification from console to desktop:
    notify-send --expire-time=10000 "message1" "message2"
  • debug gluster client connection:
    export LC_ALL=C; /usr/sbin/glusterfs --debug --volfile-server=‹server› --volfile-id=‹volume› /mount/to/
  • Reverse string (when server doesn’t has rev tool, like solaris…)
    echo 123| perl -ne 'chomp;print scalr reverse . "\n";'