Day 2 : 90Days of DevOps Challenge


Basic Linux commands:
Listing commands -
ls
--> The ls command in Linux shows you the files and folders in a directory. It's like looking at what's inside a folder on your computer.ls -l
--> Using ls -l in Linux gives you a detailed list of files and folders, showing extra information like permissions, file size, owner, and more.ls -a
--> Using ls -a in Linux displays all files, including hidden ones starting with a dot, in a directory.ls *.sh
--> Using ls *.sh in Linux shows files with a '.sh' file extension, often shell scripts, in a directory.ls -i
--> Using ls -i in Linux reveals the unique index numbers (inodes) of files in a directory, useful for technical file management.ls -d */
--> Using ls -d */ command in Linux lists only directories (folders) within a directory. It helps you see the names of subdirectories without showing their contents, making it useful for directory navigation.
Directory commands -
mkdir [directory_name]
--> Using mkdir in Linux makes new folders for organizing and storing files.pwd
--> Using pwd in Linux shows your current directory, It shows the full path to your current location within the file system, so you know where you are in the system.cd [directory_path]
--> Using cd in Linux helps you switch to different folders, making it easy to access files and directories.cd ~
--> The cd ~ command in Linux takes you to your home directory. It's like going back to your personal folder where you usually start when you open a terminal or login to your computer.cd -
--> Using cd - in Linux takes you back to where you were before, like a rewind button for directories.cd ..
--> Using cd .. in Linux change your current directory to the parent directory or take you one step back to the previous directory.cd ../..
--> Using cd ../.. in Linux change your current directory to the grandparent directory or change your directory to two levels back.mkdir -p /path/to/parent/directory/newdirectory
--> Using the mkdir command in Linux, you can specify the full path along with the -p option. Replace/path/to/parent/directory/newdirectory
with the actual path and name of the nested directory you want to create. The -p option ensures that any intermediate directories in the path that don't exist will also be created.
Subscribe to my newsletter
Read articles from SHUBHAM AHUJA directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
