Archive | September 15, 2011

Create tar and copy to another server using tar

Just a note

Code:

tar -cvf – test | ssh -l username domain.com  “cd /home1/username && tar -xvf -”

Delete / remove old / order files in linux automatically

Code:
find /tmp/test -ctime +60 -delete

The above command  will delete any files created over 60 days ago in the /tmp/test  folder (and all subfolders).

You can add this to a cron job and it will be automatic daily, weekly, monthly

Follow

Get every new post delivered to your Inbox.