Linux

Articles about Linux

Delete .svn folders recursively

rm -rf `find . -type d -name .svn`

How to - create and extract a tar.gz archive

 Create an archive
tar czf /path/to/output/folder/filename.tar.gz /path/to/folder

Extract an arhive
tar -zxvf /path/to/folder/filename.tar.gz
gunzip -c /path/to/folder/filename.tar.gz

Extract one file from the archive
gunzip -c /path/to/folder/filename.tar.gz | tar -xvf - path/within/archive/filename.ext

View files in an archive
gunzip -c /path/to/folder/filename.tar.gz | tar -tvf -

Search and replace in all the files inside a directory via command line

I've had the need to search for a bunch of strings and replace them with something else in over 500 files.. I did once.. now I need to do it again (...don't ask...), so here is the command that does it for future reference:

find ./ -type f -exec sed -i ’s/string1/string2/’ {} \;

VLC holiday icon

vlc

Did you notice the VLC icon wearing the Santa hat during the holidays? Nice feature from the programmers.