45 private links
"cat /dev/null > ~/.bash_history && history -c && exit"
Command Syntax
find /path/to/files* -mtime +5 -exec rm {} \;
Note that there are spaces between rm, {}, and \;
Explanation
The first argument is the path to the files. This can be a path, a directory, or a wildcard as in the example above. I would recommend using the full path, and make sure that you run the command without the exec rm to make sure you are getting the right results.
The second argument, -mtime, is used to specify the number of days old that the file is. If you enter +5, it will find files older than 5 days.
The third argument, -exec, allows you to pass in a command such as rm. The {} \; at the end is required to end the command.
egrep $(echo $(cat /var/log/mail.log | grep "heo@toto.fr" | awk '{print $6}' | tr -d ':') | sed 's/ /|/g') /var/log/mail.log | sed 's/.removed./&\n/'
Yatta !!!
!/bin/bash
function nextIP {
for i in {"1","2","3","4"};do
eval digit$i=$(echo $1| cut -d'.' -f$i)
done
for i in {"4","3","2","1"};do
if [ $(eval echo "\${digit$i}") -lt 255 ];
then
let digit$i=$(eval echo "\${digit$i}")+1
IP="$digit1.$digit2.$digit3.$digit4"
return 0
else
let digit$i=0
fi
done
return 1
}
nextIP $1
echo $IP
So good !
To prevent a command from being added to the history in the first place, make sure that the environment variable HISTCONTROL contains among its colon-separated values the value ignorespace, for example (add e.g. to .bashrc):
$ export HISTCONTROL=ignorespace
This will prevent any command with a leading space from being added to the history. You can then clear the history completely by running
$ history -c -w
^-- additional space character