Commonly Used Linux CLI Commands
- Note: Extra information in parenthesis, is not included part of command
- List files/folders
ls
-a
-lh
cd </path/directoryName/>
cd ~
mkdir <directoryName>
- Move a file or renaming a file
mv <file> <DestinationPath>
mv <file> <newFileName>
rm <fileName>
rm -r <directoryName>
- Archive a directory/folder using Tar gz
tar --cfz <fileName.tar.gz> <directory>
tar --xzf <file.tar.gz> -C <extractedFolderName>
- Changing Permissions
(Just use this calculator Link)
chmod +x <file>
- Outputting content of file without editor
cat <fileName>
- Quickly creating/editing a file without editing it
touch <fileName>
echo "Whatever text you want in the file" >> <fileName.txt>