Thursday, March 9, 2017

Find text inside compressed files

Designed by Freepik You have a group of files and some of them are compressed with zip or gz and you want to search for a specific text in each of them. To do this, you can use the following command: find -name [FILE_PATTERN] -print0 | xargs -0 zgrep "[TEXT_TO_FIND]" Where: [FILE_PATTERN] : is...

Tuesday, March 7, 2017

Copy directories with scp

scp -rp [directory_to_copy] [user]@[host]:[path] Where: [directory_to_copy]: directory to be copied [user]: destination host user [host]: destination host [path]: destination path -r: recursive, copy all directory content. -p: preserves modification times, access times, and modes from the original fi...

Popular Posts

Recent Posts

Unordered List

Text Widget

Pages

Search This Blog

Powered by Blogger.