Command Line Utilities
Jump to navigation
Jump to search
This is a collection of random useful command line tools.
- To obtain the space available on a HD: df -h
rsync
- --no-p: this will disable permissions synchronization.
- --no-o: this will disable owner synchronization.
cpio
- This seems to be something similar to tar.
- Allows you to do nice stuff like
find . -name '*.txt' print0 | cpio -o -0 | ssh elvanor@otherbox 'cd dirB && cpio -iduv -0'
This would copy the *.txt files to another box, preserving the directory hierarchy.
Tricks and tips
- Redirecting all outputs to a file:
foo &> bar
To redirect only stderr:
foo 2> bar