5 August 2006
Quick Linux Command Line Tips
Posted by Mikhail Esteves under: LAMP; Tips .
Mirror web site (using compression and encryption)
rsync -az -e ssh --delete ~/public_html/ remote.com:'~/public_html'
Synchronize current directory with remote one
rsync -auz -e ssh remote:/dir/ . && rsync -auz -e ssh . remote:/dir/
Save a copy of data cdrom
gzip < /dev/cdrom > cdrom.iso.gz
Create cdrom image from contents of dir
mkisofs -V NAME -r dir | gzip > cdrom.iso.gz
Make encrypted archive of dir/ on remote machine
tar c dir/ | gzip | gpg -c | ssh user@remote 'dd of=dir.tar.gz.gpg'
Backup harddisk to remote machine
dd bs=1M if=/dev/hda | gzip | ssh user@remote 'dd of=hda.gz'
Store local browsable version of a page to the current dir
(cd cmdline && wget -nd -pHEKk http://www.pixelbeat.org/cmdline.html)
Download a set of files to the current directory
wget -r -nd -np -l1 -A '*.jpg' http://www.example.com/
Efficiently update a local copy of a site (handy from cron)
wget --mirror http://www.example.com/
One Comment so far...
sysconfig Says:
14 September 2006 at 5:34 pm.
Further advance command you could find at:
http://forums.linuxwebadmin.info/index.php/topic,20.0.html
thx,