Tip #21
Place a filename at the beginning of the line to make it easier to edit the search at the end of the command.Read more »
- TAGS:
- grep
- redirection
Tip #892 Check memory and swap from command line
Want to check the amount of used, free and total memory and swap from the command line? This script displays memory and swap information. Fully posix compliant and should work with all 2.[2-6].* kernels .Read more »
Tip #22 Grepping for processes
Grepping for a process will return the grep command, this can be avoided by adding '| grep -v grep' to a command or easier in some cases altering the regular expression by adding brackets around a character.Read more »
Tip #885 Random password generator.
Generate a random 8 character password containing a-z, A-Z and 0-9:Read more »
- TAGS:
- grep
Tip #147 Find and Grep
Find all files with given name (you can use Bash expansion if you'd like), and Grep for a phrase:Read more »
Tip #189 Remove every file but one
It's easy to remove (or copy, move etc.) all files that match a given criteria, but harder to move all but ones excluded by a criteria.To do this we can combine grep's -v option with Unix command substitution:
Read more »
Tip #93 Subtract one file from another
Subtract a small file from a bigger file.Read more »
- TAGS:
- grep
Tip #290 Crawl a web page for links
lynx -dump http://www.spantz.org | grep -A999 "^References$" | tail -n +3 | awk '{print $2 }' 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