Skip to content
Bash cheatsheet

Bash cheatsheet

Commands

  • Create files with spaces in their names using xargs: ls /your/dir | tr -d "'" | xargs -t -I {} touch "{}"
  • Send a desktop notification from the console: notify-send --expire-time=10000 "message1" "message2"
  • Debug a GlusterFS client connection: export LC_ALL=C; /usr/sbin/glusterfs --debug --volfile-server=<server> --volfile-id=<volume> /mount/to/
  • Reverse a string (when the server has no rev, e.g. Solaris): echo 123 | perl -ne 'chomp; print scalar reverse . "\n";'

Links

Last updated on