|
|
|
|
Blog by JasmineCorp | Create your own Blog
|
RSS Feed | Login |
This is my Perl Tips and Explanation page to explain how some of the common things work.
|
Backup Linux files over SSHBy Vinod at 2011-05-30 16:32:39
|
Backup entire system but exclude proc, lost_found, dev, mnt, media, sys, tmp etc folders. Send the back up to another system using SSH.
tar -cvpzf - --exclude="/proc/*" --exclude="/lost+found/*" --exclude="/dev/*" --exclude="/mnt/" --exclude="/media/*" --exclude="/sys/*" --exclude="/tmp/*" --exclude="/var/cache/apt/*" /* | ssh USER@HOST "cat > FILENAME.tar.gz" |
Permalink | Comments (1) |
kill process with grep and awkBy Vinod at 2008-07-02 08:35:48
|
Some times you want to kill process that have certain keywords in the command line.
Here is how to kill them with grep and awk. ps -efw | grep "keyword" | awk '{print kill $2}'
|
Permalink | Comments (0) |
How <<EOF..... EOF works in perlBy Vinod at 2005-06-22 13:10:06
|
Combination of <<EOF ..... EOF is used in perl to tell the interpreter to consider the text between < for example $foo = "this is a string";
is equvelent of $foo = <<EOF this is a string EOF ;
Things to be noted it starts with <<EOF and a new line after that you can put all your text and it closes with a newline EOF newline and semico Read More..... |
Permalink | Comments (1) |
|