Bash Command Line

2018.11.10 Command Line basic commands _ GitLab

How to tar a file

https://www.cyberciti.biz/faq/how-to-tar-a-file-in-linux-using-command-line/

Compress an entire directory by running

tar -zcvf file.tar.gz /path/to/dir/ 

command in Linux

Compressing Contents Into a Tar File

Compress a single file by running

$ tar -zcvf file.tar.gz /path/to/filename

Compress multiple directories file

$ tar -zcvf file.tar.gz dir1 dir2 dir3

Extracting Contents of a Tar File

Extracting contents of tar file to the current directory.

$ tar -xzvf file.tar.gz

Extracting contents of tar file to a new directory.

$ tar -xzvf my.tar.gz -C /home/vivek/backups/

Finding Differences Between Files

$ diff -c file1 file2

TODO: add example

which

find executable paths of programs

$ which pip

Journal