Unzip:
- sudo apt-get install unzip
- unzip [file]
Tar:
- tar -cvvf foo.tar [directory]
Untar:
- tar -zxvf yourfile.tar
- tar -xvfz filename.tar.gz
- tar -xvzf filename.tar.gz [directory]
- tar -jxvf filename.tar.bz2
Find: find [dir] -type d|f -iname ‘searchstring’
- find / -type -d -iname ‘python’
- find ~ -type d -exec chmod +x {} \;
Delete a user account
Add an New user
or
- sudo useradd -d /home/<directory> -m <username>
( -d specifies home directory, -m makes the folder if it doesn’t exist )
useradd doesn’t add password unless you add -p …. or you can just set the password later with:
If called with two non-option arguments (see below), adduser will add an existing user to an existing group.
Add an existing user to an existing group
- sudo usermod -a -G <group> <user>
Set password of new user
Make a new Group:
To see what groups currently exist:
To see current users logged in:
Count lines in file: