Tip #251 Argument list too long
ls | xargs rm
Sometime there are so many files in a directory than the rm command doesn't work
Read more »
Tip #249 Sum up your HDD space
Longish oneliner (I actually wrote it in one line first) for giving you somewhat (mount list is never good enough) accurate sum of your file systems' totals.Read more »
Tip #248 Using FIFOs
If you want to tail the errors on another terminal, just push them to a fifo:Read more »
- TAGS:
- mkfifo
Tip #247 See your favorite commands
Use the following to see the commands you use most often based on your shell history:Read more »
Tip #246 Dealing with duplicate lines
You can use the 'uniq' command to handle duplicate lines in a file:Read more »
- TAGS:
- uniq
Tip #245 Alter Process Priority
Ever been on a machine that just wouldn't respond? As soon as you're root, lower the priority of the offending process ID(s) by using the 'renice' command:Read more »
- TAGS:
Tip #234 unwrapping ldapsearch's ldif output
I'm working on a project to access data from my corporate Active Directory server using ldapsearch. The version of ldapsearch that comes with Red Hat Enterprise Server spews out LDIF in column truncated format. That is to say it inserts a carriage return at column 80 of the output.This sed goodie unwraps the ldif output.
UNWRAP=' /^ / {; H; d; }; /^ /! {; x; s/\n //; }; ' Read more »
- TAGS:
- sed
Tip #233 Remove numbers from history
Use the following command to give a history listing without the numbers for easier copy and pasting:Read more »
Tip #232 Deleting difficult filenames
To delete a file who's file name is a pain to define (eg. ^H^H^H) find it's inode number with the command "ls -il". Use the line below to find and delete the file.Read more »
alias aptitude at awk bash bc cal cat cd colrm comm cp csh curl cut date dd df dialog diff dirname dpkg du fc find fuser grep gs gzip history iconv kill ksh last less ln ls lsof lynx m4 md5sum mkdir mkfifo mkisofs mv mysql nc netstat openssl OSX perl ping popd ps pushd python read redirection rm scp screen sed sort ssh stat sudo svn tail tar tee test top tr uniq vim wc wget xargs