chapp.txt
chapq.txt
chapr.txt
chaps.txt
chapt.txt
chapu.txt
chapv.txt
chapw.txt
chapx.txt
chapy.txt
chapz.txt
8. To give appropriate command to create a directory called C_prog under your home
directory is:
mkdir /home/dac/C_prog
The output when use command ls is as follows:
C_prog as directory
9.To create the following directories under your home directory is:
mkdir /home/dac/newdir /home/dac/newdirectory
The follows output is as follows:
Directory newdir and directory newdirectory are created
10. To list the names of all the files, including the contents of the sub
directories under your home directory is:
ls /home/dac/*
The result is as follows:
/home/dac/hUNIX
/home/dac/zUNIX
/home/dac/arr:
arr.cpp
11. To remove the directory called newdirectory from your working directory is:
rm -r /home/dac/newdirectory/
The result is this directory was deleted.
12. To create a directory called temp under your home directory is:
mkdir /home/dac/temp
The result is this directory was created.
13. To remove the directory called newdir under your home directory and verify the
above with the help of the directory listing command is:
rm -r /home/dac/newdir
ls /home/dac
The result is this directory was deleted.
14. To create another directory directorynew under the temp directory is:
mkdir /home/dac/temp/directorynew
The result is this directory was created.
15. To change the directory to your home directory is:
cd
16. From your home directory, change the directory to directorynew using relative
path :
cd Documents/241
and absolute path is:
cd /home/dac/Documents/241
17. To remove the directory called c_prog, which is in your home directory is
rm -r /home/dac/c_prog
18. To change to the directory /etc and display the files present in it :
cd /etc
ls
The output is as follows :
aclocal_dirlist
hosts.deny
polkit-1
19. To List the names of all the files that begin with a dot in the /usr/bin
directory is:
cd /usr/bin
find -name .*
The output is as follows:
.
./.fipscheck.hmac
./.hmac256.hmac
20. To create a file first.unix with the following contents is:
cat > first.unix then type the contents. When it is done press enter and ctrl+c.
The output is as follows: file first.unix is created with that content.
21. To copy the file first.unix in your home directory to first.unics is:
cp first.unix first.unics
The output is as follows:
ls
and the
31. Try commands cp and mv with invalid number of arguments and note the results.
Error message :
cp: target the last arguments is not a directory
mv: target the last arguments is not a directory
32. Use the cat command to create a file friends, with the following data:
Madhu 6966456 09/07/68
Jamil 2345215 08/09/67
Ajay 5546785 01/04/66
Mano 7820022 09/07/68
David 8281292 09/09/60
Simmi 7864563 12/12/70
Navin 2224311 30/05/68