#90DayDevOpsChallange #Day 2

ganesh gaikwadganesh gaikwad
2 min read

Hello Friends, now I am starting #90day DevOps challenge. Today is my Day 2 and we study some Linux commands. ##90daysofdevops chanllenge Shubham Londhe

Basic Linux commands

Listing commands

ls option_flag arguments --> list the sub directories and files avaiable in the present directory

Examples:

  • ls -l--> list the files and directories in long list format with extra information

  • ls -a --> list all including hidden files and directory

  • ls *.sh --> list all the files having .sh extension.

  • ls -i --> list the files and directories with index numbers inodes

  • ls -d */ --> list only directories.(we can also specify a pattern)

  • ll —> list all the file permission and all link and all info

Directoy commands

  • pwd --> print work directory. Gives the present working directory.

  • cd path_to_directory --> change directory to the provided path

  • cd ~ or just cd --> change directory to the home directory

  • cd - --> Go to the last working directory.

  • cd .. --> change directory to one step back.

  • cd ../.. --> Change directory to 2 levels back.

  • mkdir directoryName --> to make a directory in a specific location

  • touch —> create new file in specific location

  • touch -p path of directory and file name -→ create file with the directory to inside directory

  • ex. touch /home/ubuntu/day2/day.txt

  • mkdir -p path of directory - ->create directory inside directory with relative path

  • touch file name {range} - - > create multiple file in single command

  • mkdir directory name {range} - - >create multiple directory in single command

  • vim/vi/echo - - > using this also we can create new file

0
Subscribe to my newsletter

Read articles from ganesh gaikwad directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

ganesh gaikwad
ganesh gaikwad