Tag: Linux

Archive Contents

Show contents of an archive tar -tf archive.tar

Write and Append Permission

Allows write opening of a file only append mode chattr +a file

pwck Command

check correct syntax and file format of ‘/etc/passwd’ and users existence pwck

grpck Command

Check correct syntax and file format of ‘/etc/group’ and groups existence grpck

Delete User

Delete a user ( ‘-r’ eliminates home directory) userdel -r user1

Password Deadline

Set deadline for user password chage -E 2008-12-31 user_name

Change User Attributes

Change a user’s attributes usermod -c “User FTP” -g system -d /ftp/user1 -s /bin/nologin user1

Create New User

Create a new user belongs “admin” group called ‘user1’ useradd -c “Name Surname ” -g admin -d /home/user1 -s /bin/bash…

Package Listing in Debian

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 an User Group

Rename a group groupmod -n new_group_name old_group_name