Check These Out
Useful if you want get all the md5sum of files but you want exclude some directories. If your list of files is short you can make in one command as follow:
$ find . -type d \( -name DIR1 -o -name DIR2 \) -prune -o -type f -exec md5sum {} \;
Alternatively you can specify a different command to be executed on the resulting files.
Alias the grep command to show colored results by default.
This command checks for the number of times when someone has tried to login to your server and failed. If there are a lot, then that user is being targeted on your system and you might want to make sure that user either has remote logins disabled, or has a strong password, or both. If your output has an "invalid" line, it is a summary of all logins from users that don't exist on your system.
Starting with a large MySQL dump file (*.sql) remove any lines that have inserts for the specified table. Sometimes one or two tables are very large and uneeded, eg. log tables. To exclude multiple tables you can get fancy with sed, or just run the command again on subsequently generated files.
Let me suggest using wget for obtaining the HTTP header only as the last resort because it generates considerable textual overhead. The first ellipsis of the sample output stands for
Spider mode enabled. Check if remote file exists.
--2009-03-31 20:42:46-- http://www.example.com/
Resolving www.example.com... 208.77.188.166
Connecting to www.example.com|208.77.188.166|:80... connected.
HTTP request sent, awaiting response...
and the second one looks for
Length: 438 [text/html]
Remote file exists and could contain further links,
but recursion is disabled -- not retrieving.
If you are already running screen then you often want to start a command in a fresh window. You use this alias by typing 's whatever' from your command line and 'whatever' starts running in a new window. Good with interactive commands like info, vim, and nethack.
using -u is better for standardizing date output and timezones, for servers in different timezones.
ps returns all running processes which are then sorted by the 4th field in numerical order and the top 10 are sent to STDOUT.