We are back again with another Linux command tutorial. This will be the last part of Linux Basic commands. In case you missed it Working with Basic Linux command part-1.
File creation, Traversing and Editing
“echo“- Echo command is used to create a file with text in it.
echo"TEXT" > [file_name]
“cat”- cat command is used to print the data from file.
“nano”- nano is a built in text editor that can be used to edit text in terminal.
File compression and decompression
In Linux we can compress directories and files with “tarball”
“tar”- tar command is used to compress a file.
- -c: Create an archive.
- -z: Compress the archive with gzip.
- -v: Display progress in the terminal while creating the archive, also known as “verbose” mode. The v is always optional in these commands, but it’s helpful.
- -f: Allows you to specify the filename of the archive.
- -x: Allows you to decompress a file.
tar [options] [archived_file_name.tar.gz] [file_name]
“apt”- apt command installs applications.
Updating repositories- sudo apt-get update
App installation- sudo apt-get install [package_name]
Copying and Moving file
“cp” – cp command copies a file from one directory to another.
cp [file_path] [target_path]
“mv”- mv command moves a file from one directory to another.
mv [file_path] [target_path]
Comment below for feedback. We will be back with more commands.
Linux-Commands Part 1