Day 4 of My 90-Day DevOps Challenge: Exploring Basic Linux Commands Practically .
Linux Commands
Table of contents
Pwd - Present working directory , it shows where your currently in
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
- 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
- date - it prints the current date
- Touch <filename> - to create the file
- 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
zcat - we use this command to see zip files
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
- tail - tail is used to show last 10 lines of a file
less <file name> - shows in small paginated format
more <filename>- it shows in more paginated format
cp - it is used to copy the files or dir .
mv - to rename the file and dir and also we use to mv the file and dir to destination location.
wc - it is used to count the number of lines , words , characters
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
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.