Skip to main content

Quick Commands

Change owner of folder

sudo chown -R <linuxuser>:<linuxgroup> <pathtofolder>

Manage Linux groups

Create group

groupadd <groupname>

Add user to group

usermod -a -G <linuxgroupname> <linuxusername>

List groups

sudo groups -la

Managing tar files

Preview content of tar file

tar -tzf <pathtofile.tar>

Extract content of tar file

tar -xzf <pathtofile.tar>

Copy files and folders

cp -r <sourcefolder1/sourcefile1> <sourcefolder2/sourcefile2> <sourcefolder3/sourcefile3> <destinationfolder>

SCP

scp <username>@<sourcehost>:<sourcefile/sourcefolder> <destinationfolder>