To simply print
echo I like to code
Sleep: Sleep command pauses for some time as specified by the NUMBER
sleep NUMBER[SUFFIX]To check present working directory
pwdNavigating directories
Syntax
cd [option] [directory_name]| Option | Meaning |
|---|---|
| / | To change the current directory to Root directory |
| -L | This mode lets cd move directly to the directory the link is pointing to |
| -P | This mode is opposite of -L. It uses physical directories and does not follow symbolic links |
| -e | This option is only used to show an error in case the cd command fails to determine the director |
Examples
To move from current directory to parent directory (Remember Linux has tree based directory structure so cd .. ( going back) means moving upward)
cd ..To move from current directory to a different directory using relative path cd [name]
cd ..
cd etc
lsTo move from current directory to a different directory using relative path
cd ..
cd etc/R/
lsTo create a directory
mkdir [options][dir_name]
mkdir demoTo remove a directory
rmdir demoPrint all the files in the directory, including the hidden files as well
ls -aSort files/directories by time
ls -t