Day 4 of My 90-Day DevOps Challenge: Exploring Basic Linux Commands Practically .

Linux Commands

  1. Pwd - Present working directory , it shows where your currently in

  2. ls - list of files

  • ls -a - shows hidden files and dir

  • ls -l - it shows the long list of files and dir in detailed format.

  • ls -t - it shows the files and dir of latest modified

  • ls -r - it shows in reverse direction

  1. cd < dir name> - change directory - to move from one directory to another directory

  • cd .. - if we want to come one step back then we use this command

  • cd - : to point previous where we were in

  • cd ../.. - to come out from 2 levels back

  1. date - it prints the current date

  1. Touch <filename> - to create the file

  1. cat <file name> - to see the content of the file

6.echo "content" - to print the given content on the terminal

if you want to print inside the file then you can command like below

echo "Hello world" > filename & cat filename

  1. zcat - we use this command to see zip files

  2. Head - Head is used to show the above 10 lines of code

    suppose if u use -n and give any number what ever number you will give that many lines it shows

  1. tail - tail is used to show last 10 lines of a file

  1. less <file name> - shows in small paginated format

  2. more <filename>- it shows in more paginated format

  3. cp - it is used to copy the files or dir .

  4. mv - to rename the file and dir and also we use to mv the file and dir to destination location.

  5. wc - it is used to count the number of lines , words , characters

  6. ln - Links are shortcuts , to create hard link, is nothing but it wil have the same properties of the orginal file eventhough the main file got deleted the link file is not going to delete

  7. ln -s : to create soft link doesnt have same properties , it will point to orginal file if the orginal file gets delete then this link file also will be going to delete

Next will discuss about permissions ,& user management.