Check These Out
A little aptitude magic. Note: this will remove images AND headers. If you just want to remove images: aptitude remove ?and(~i~nlinux-im ?not(~n`uname -r`))
I used this in zsh without any problems. I'm not sure how other shells will interpret some of the special characters used in the aptitude search terms. Use -s to simulate.
-L tells find to follow symbolic links, so -type l will only return links it can't follow (i.e., those that are broken).
Create a exact mirror of the local folder "/root/files", on remote server 'remote_server' using SSH command (listening on port 22)
(all files & folders on destination server/folder will be deleted)
Convert readable date/time with `date` command
$ command | my_irc
Pipe whatever you want to this function, it will, if everything goes well, be redirected to a channel or a user on an IRC server.
Please note that :
- I am not responsible of flood excesses you might provoke.
- that function does not reply to PINGs from the server. That's the reason why I first write in a temporary file. Indeed, I don't want to wait for inputs while being connected to the server. However, according to the configuration of the server and the length of your file, you may timeout before finishing.
- Concerning the server, the variable content must be on the form "irc.server.org 6667" (or any other port). If you want to make some tests, you can also create a fake IRC server on "localhost 55555" by using
$ netcat -l -p 55555
- Concerning the target, you can choose a channel (beginning with a '#' like "#chan") or a user (like "user")
- The other variables have obvious names.
I often use it to find recently added ou removed device, or using find in /dev, or anything similar.
Just run the command, plug the device, and wait to see him and only him
Usefull to determine unknown file type
puts command in background and sends its output to nohup.out file
it will not die if you log out fromyour shell session ;-)
Doesn't work so well if you connect from windows. Linux only sends LF where windows wants CRLF. The alternative command works better with windows, however it uses script and a named pipe.