Slide 1
Most trusted JOB oriented professional program
DevOps Certified Professional (DCP)

Take your first step into the world of DevOps with this course, which will help you to learn about the methodologies and tools used to develop, deploy, and operate high-quality software.

Slide 2
DevOps to DevSecOps – Learn the evolution
DevSecOps Certified Professional (DSOCP)

Learn to automate security into a fast-paced DevOps environment using various open-source tools and scripts.

Slide 2
Get certified in the new tech skill to rule the industry
Site Reliability Engineering (SRE) Certified Professional

A method of measuring and achieving reliability through engineering and operations work – developed by Google to manage services.

Slide 2
Master the art of DevOps
Master in DevOps Engineering (MDE)

Get enrolled for the most advanced and only course in the WORLD which can make you an expert and proficient Architect in DevOps, DevSecOps and Site Reliability Engineering (SRE) principles together.

Slide 2
Gain expertise and certified yourself
Azure DevOps Solutions Expert

Learn about the DevOps services available on Azure and how you can use them to make your workflow more efficient.

Slide 3
Learn and get certified
AWS Certified DevOps Professional

Learn about the DevOps services offered by AWS and how you can use them to make your workflow more efficient.

previous arrow
next arrow

Linux Commands: User Guide Reference

Spread the Knowledge

‘cd’ command in Linux with examples

‘pwd’ command in Linux with examples

‘mkdir’ command in Linux with examples

‘rm’ command in Linux with examples

‘ls’ command in Linux with examples

‘cat’ command in Linux with examples

‘script’ command in Linux with examples

‘passwd’ command in Linux with examples

‘echo’ command in Linux with examples

‘uniq’ command in Linux with examples

‘who’ command in Linux with examples

‘who am i’ command in Linux with examples

‘uname’ command in Linux with examples

‘more’ command in Linux with examples

‘less’ command in Linux with examples

‘wc’ command in Linux with examples

‘cp’ command in Linux with examples

‘zip & unzip’ command in Linux with examples

‘gzip and gunzip’ command in Linux with examples

‘tar’ command in Linux with examples

‘ps’ command in Linux with examples

‘nohup’ command in Linux with examples

‘sort’ command in Linux with examples

‘kill’ command in Linux with examples

‘jobs’ command in Linux with examples

‘fg’ command in Linux with examples

‘crontab’ command in Linux with examples

‘ln’ command in Linux with examples

‘touch’ command in Linux with examples

‘head’ command in Linux with examples

‘tail’ command in Linux with examples

‘chmod’ command in Linux with examples

‘chown’ command in Linux with examples

‘find’ command in Linux with examples

‘grep’ command in Linux with examples

‘cut’ command in Linux with examples

‘tr’ command in Linux with examples

‘vi’ command in Linux with examples

‘sed’ command in Linux with examples

‘file’ command in Linux with examples

file command is used to determine the type of a file. .file type may be of human-readable(e.g. ‘ASCII text’) or MIME type(e.g. ‘text/plain; charset=us-ascii’). This command tests each argument in an attempt to categorize it.

It has three sets of tests as follows:

  • filesystem test: This test is based on the result which returns from a stat system call. The program verifies that if the file is empty, or if it’s some sort of special file. This test causes the file type to be printed.
  • magic test: These tests are used to check for files with data in particular fixed formats.
  • language test: This test search for particular strings which can appear anywhere in the first few blocks of a file.
$ file email.py
$ file name.jpeg
$ file Invoice.pdf
$ file exam.ods
$ file videosong.mp4
$ man file

‘cmp’ command in Linux with examples

cmp command in Linux/UNIX is used to compare the two files byte by byte and helps you to find out whether the two files are identical or not.

  • When cmp is used for comparison between two files, it reports the location of the first mismatch to the screen if difference is found and if no difference is found i.e the files compared are identical.
  • cmp displays no message and simply returns the prompt if the the files compared are identical.
$ cat sample.txt
This is a sample text file

$ cat sample1.txt
This is another sample file

$ cmp sample.txt sample1.txt
sample.txt sample1.txt differ: byte 10, line 1

# How to compare two files using cmp
$ cmp file1.txt file2.txt

# How to make cmp print differing bytes
$ cmp -b file1.txt  file2.txt

# How to make cmp skip some initial bytes from both files
$ cmp -i 10 file1.txt  file2.txt

# How to make cmp display byte position (and value) for all differing bytes
$ cmp -l file1.txt  file2.txt

# How to limit number of bytes to be compared
$ cmp -n 25  file1.txt  file2.txt

# How to display progress meter while using cmp command
$ pv file1.txt | cmp -l file3.txt > output.txt

# How to make 'cmp' suppress output
$ cmp -s file1.txt file2.txt

‘comm’ command in Linux with examples

comm compare two sorted files line by line and write to standard output; the lines that are common and the lines that are unique.

‘stat’ command in Linux with examples

stat is a command-line utility that displays detailed information about given files or file systems.

# Check Linux File Status. The easiest way to use stat is to provide it a file as an argument. The following command will display the size, blocks, IO blocks, file type, inode value, number of links and much more information about the file /var/log/syslog, as shown in the screenshot:
$ stat /var/log/syslog

# Check File System Status. In the previous example, stat command treated the input file as a normal file, however, to display file system status instead of file status, use the -f option.
$ stat -f /var/log/syslog

# You can also provide a directory/filesystem as an argument as shown.
$ stat -f /

# Since Linux supports links (symbolic and hard links), certain files may have one or more links, or they could even exist in a filesystem. To enable stat to follow links, use the -L flag as shown.
$ stat -L /

# Print Information in Terse Form. The -t option can be used to print the information in terse form.
$ stat -t /var/log/syslog

Customizing the environment

# set – set statemtent display a complete list of all environment variable
# PATH =$PATH:/usr/xpg4/bin – Adding new value to old values
# PS1 =”C> “ – To Change the prompt
# PS1=’[$PWD] ‘ – To Change the prompt to pwd
# alias cp=”cp –I” – To Set the alias in bash
# history – To See the history
# IFS – Field Separators for commands and arguments
# !! – Repeat Previous commands
# !2 – Repeat commands 2 from history output
# !-2 – Execute the commands prior to previous one
# !v – Execture very last commands beginning withg v
# $_ – Using last arugement of previous commands
# mkdir raj
# cd $_

‘locate’ command in Linux with examples

‘mv’ command in Linux with examples

‘sudo’ command in Linux with examples

‘diff’ command in Linux with examples

‘ping’ command in Linux with examples

Rajesh Kumar