large files

Copy and Uncompress (ssh, gunzip, tar) from Remote Server

So you have a remote backup and you want to quickly have it restored locally or to another server without transferring, then uncompressing as 2 or 3 steps.

ssh user@remote-server "cat /path/to/compressed/backup.tar.gz" | tar xzvf -

Tags: , , , , , ,

Sunday, June 26th, 2011 Linux, Networking, Unix No Comments

Copy Large Files Over the Network with Netcat + tar + Qpress compression

On the target host, change directory to the folder you want to copy the files to:

nc -l 9999 | qpress -vdio | tar xvf -

On the source host, change directory to the folder containing the files to be copied:

tar -cf - . | qpress -vio - . | nc [TARGET_HOST_IP] 9999

Tags: , , , , , ,

Tuesday, November 30th, 2010 Linux, Networking, Unix No Comments

Find Large Files using `find` Command

Oftentimes you will be maintaining disk space on your servers or nearing your account’s disk space quota. Quickly you want to know which files are taking up your disk space, here’s a quick rundown to find files greater than 10MB.

find . -type f -size +10240k -exec ls -lh {} \; | awk '{ print $9 ": " $5 }'

This will find files from your current working directory and list them alongside their corresponding sizes.

Tags: , ,

Wednesday, November 11th, 2009 Bash, Linux, Mac, Unix No Comments