basic command




New Account

sudo useradd -g [accountGroup] [newAccount]

Set Account Password
sudo passwd [account]

Delete Account
userdel -f [account]

New Group
groupadd [groupName]


Change file or dir owner and group
sudo chown -R [owner ]:[group]  [file/dir]
sudo chown -R root:data /data/bin/*


Change file or dir privilege
sudo chmod [privilege] [file/dir]
sudo chmod 6755 /data/bin/*

 Check Folder size
du -sh /etc
7.8M    /etc

HP-UX  Folder size
du -s /data/en/charg

HP-UX  tar Folder
tar cf - /home/test | gzip -c > test.tar.gz


HP-UX  tar last 1 day file
find /home/test   -mtime -1 | cpio -o | gzip -c > find.gz


HP-UX delete old data than 2 day
find /home/test -type f -mtime +2 -exec rm -f {} +



留言

熱門文章