- Access Hands-On Labs here Hands-On-Labs
-
To check the home directory for a particular user say
bob$ grep bob /etc/passwd | cut -d ":" -f6 -
To check the home directory for a particular user using built in shell variables
$ echo $HOME -
In the command
echo Welcome, what does the word Welcome represent with respect to the command?$ echo Welcome - Where Welcome is an argument -
To check
gitcommand type$ type git -
To create a directory
$ mkdir /home/bob/birds -
To create directories recursively
$ mkdir -p /home/bob/fish/salmon -
Create few more directories
$ mkdir -p /home/bob/mammals/elephant $ mkdir -p /home/bob/mammals/monkey $ mkdir /home/bob/birds/eagle $ mkdir -p /home/bob/reptile/snake $ mkdir -p /home/bob/reptile/frog $ mkdir -p /home/bob/amphibian/salamander -
To move a directory
$ mv /home/bob/reptile/frog /home/bob/amphibian -
To rename a directory
$ mv /home/bob/reptile/snake /home/bob/reptile/crocodile -
To delete a directory
$ rm -r /home/bob/reptile