Check These Out
This command shows a sorted list of the IP addresses from which there have been authentication errors via SSH (possible script kiddies trying to gain access to your server), it eliminates duplicates so it's easier to read, but you can remove the "uniq" command at the end, or even do a "uniq -c" to have a count of how many times each IP address shows in the log (the path to the log may vary from system to system)
Also looks in subfolders
Works in Ubuntu, I hope it will work on all Linux machines. For Unixes, tail should be capable of handling more than one file with '-f' option.
This command line simply take log files which are text files, and not ending with a number, and it will continuously monitor those files.
Putting one alias in .profile will be more useful.
Useful if you have to put together multiple files into one and they are scattered across subdirectories. For example: You need to combine all .sql files into one .sql file that would be sent to DBAs as a batch script.
You do get a warning if you create a file by the same extension as the ones your searching for.
find . -type f -name *.sql -exec cat {} > BatchFile.txt \;
Get the svn info, grep for the "URL" of the repository, pull out the tag/branch/trunk, and then just show the helpful/meaningful bit.
Add this to a fiend's .bashrc.
PROMPT_COMMAND will run just before a prompt is drawn.
RANDOM will be between 0 and 32768; in this case, it'll run about 1/10th of the time.
\033 is the escape character. I'll call it \e for short.
\e7 -- save cursor position.
\e[%d;%dH -- move cursor to absolute position
\e[4%dm \e[m -- draw a random color at that point
\e8 -- restore position.
For those who like to hit instead of typing "exit" to leave the shell and find it annoying that it doesn't work in Midnight Commander, just press to switch to the subshell and now you can leave with
Need to find a Mageia Linux mirror server providing Mageia 4 via rsync?
Modify the "url=" string for the version you want. This shows i586 which is the 32bit version.
If you want the 64bit version it is:
url=http://mirrors.mageia.org/api/mageia.4.x86_64.list; wget -q ${url} -O - | grep rsync:
Replace 'csv_file.csv' with your filename.
An easy function to get a process tree listing (very detailed) for all the processes of any gived user.
This function is also in my http://www.askapache.com/linux-unix/bash_profile-functions-advanced-shell.html