Search This Blog

Monday, January 25, 2010

linux - check a folder size

[root@revolution endeavor]# du -hs imagespdf.del
19M imagespdf.del

linux - disable or remove a user account

1, delete an account - you need root privileges
/usr/sbin/userdel jason

check /etc/passwd
this guy should be deleted permanently

2, delete this account home directory
rm -Rf /home/jason/

3, disable/lock an account

passwd jason -l

and unlock it with

passwd jason -u

scp a folder

use -r option

[dad@revolution ~]# scp -r /usr/local/apache2/htdocs/RR/site/download/* dad@walker:/var/www/html/downloads/

zip a folder using tar

To tar a folder with all sub-folders and files

tar czf /path/zipfilename.tgz myfolder