Archive for the ‘Utilities’ Category.
May 14, 2009, 3:12 pm
If you ever need to grep some specific tags in a bunch of pdf files, you can use the following one liner, e.g:
for FILE in $(find /home/user/Desktop/downloads/ -name "*.pdf" 2>/dev/null -mtime -1 \! -type d -exec ls {} \;); do pdftotext $FILE - | grep -o 'BZ [0-9]\{5\}';done
April 18, 2009, 4:47 pm
Encrypt the file:
openssl des3 -salt -in file.txt -out encrypted_file.txt
Decrypt the file:
openssl des3 -d -salt -in encrypted_file.txt -out decrypted_file.txt
April 15, 2009, 1:57 pm
If you are a command line addict, you can download shell-fm and start listening Last.fm from there.
Links to customize it:
http://jdin.blogspot.com
http://shell-fm.wikidot.com/extending-shell-fm
March 27, 2009, 2:36 pm
fsniper allow to monitor your folders and trigger some actions based on the type of files you have there.
Example: ~/.config/fsniper/config
PDF files downloaded from Firefox on the desktop, get moved to ~/Desktop/pdf.
watch {
~/Desktop {
*.part {
handler = echo ignoring file: %%
}
application/pdf {
handler = mv %% ~/Desktop/pdf
}
}
}
Fsniper can be run in daemon mode:
fsniper --daemon
February 18, 2009, 4:58 pm
strace -f -r -o pid.out -p {PID}