|
||||
UNIX Twiddles
This is a nice one:
To spell check words from the command line you can often use:
examples that work: for the builtin bash shell function: { time sleep 1 ; } >& outfile the actual command: /usr/bin/time sleep 1 >& outfile How to delete files with a "-" (minus, dash) in front of them? rm will normally interpret the -xx as an option because it starts with a minus sign. There are two ways to avoid that: Make sure the file name does not start with a minus: For files this is always possible. You can use the full absolute path to the file or relative: rm /tmp/-xx (assuming that the file -xx is in /tmp) rm ./-xx Most unix commands accept a double minus (--) to indicate that this is the end of the options list. rm -- -xx How to delete files that contain white space or other control characters (*)? Use the \ character to escape them: rm the\ file\ with\ spaces\ in\ it rm afilewith\*anasterixinit |