Sed is a really powerful and useful linux program when you want to replace certain string in a file.
But it gets harder when you wan replase srting in all available files in directory .
Here is the solution with sed in-place command:

find /home/user/mydir -type f -exec sed -i 's/oldstring/newstring/g' {} \;

Useful links:


About 1,5 year ago I bought a Saleae clone for about 12$. Saleae clone is a small logic analyser built with 8051 microcontroller (CY7C6813A-68VPXC) with USB on board, that uses an original Saleae Logic software.

Cheap saleae clone with 8051 microcontroller.

Seleae clone.

As I remember I had some problems with drivers on Windows XP. But after a brief exchange of e-mails the seller send me a proper drivers that worked perfectly on my computer.
Read More →

I allways forget how to extract a *.tar.gz file from command line on Linux, so I have to write it down.

Example of extract tar file:

tar -xvf file.tar.gz

x extract
v verbose output (prints all extracted files)
f specify input filename
z decompress

Example of creating archive with tar:

tar -cvzf compressed_file.tar /path/to/directory

c create archive
v verbose output
f specify output filename
z compress

Other examples:
Create compressed archive with three files from separate directories:

tar -cvzf compressed_file.tar /path/to/file1 /path/to/file2 /path/to/file3

Read More →