Archive Contents
Show contents of an archive
tar -tf archive.tar
Allows write opening of a file only append mode
chattr +a file
check correct syntax and file format of ‘/etc/passwd’ and users existence
pwck
Check correct syntax and file format of ‘/etc/group’ and groups existence
grpck
Delete a user ( ‘-r’ eliminates home directory)
userdel -r user1
Set deadline for user password
chage -E 2008-12-31 user_name
Change a user’s attributes
usermod -c "User FTP" -g system -d /ftp/user1 -s /bin/nologin user1
Create a new user belongs “admin” group called ‘user1′
useradd -c "Name Surname " -g admin -d /home/user1 -s /bin/bash user1
There is a simpler command too…
useradd user1
Show space used by deb packages installed sorted by size (ubuntu, debian and like)
dpkg-query -W -f='${Installed-Size;10}t${Package}n' | sort -k1,1n
Rename a group
groupmod -n new_group_name old_group_name