Linux & X Windows Programming - Assignment II

advertisement
Code – ETCS-307
LINUX AND X WINDOWS PROGRAMMING
Assignment II
Question 1:
I) What is the purpose of following commands?
a)
b)
c)
d)
e)
f)
g)
kill -9
init 6
ls –all
cut –d: -f1,3 filename
cd../..
grep “manager” emp_data>file1 2>/dev/null
ls ..
II) What is the purpose of ifconfig tool, iwconfig tool and linuxconf tool?
Question 2: Write Linux commands
a)
b)
c)
d)
e)
f)
g)
h)
i)
To establish connections with remote user.
To display current working directory. (2 methods).
To display the filenames included in the archive abc.tar.
To mount a pen drive in read only mode with ext3 file system type.
To remove a non-empty directory.
To find the name of current working shell on which you are working.
To shut down the system at 2:00 p.m.
To kill a process of pid 1099
To find the total number of users working in a network.
Question 3:
a) What is difference between “pwd” and “PWD”?
b) What are the default permissions for newly created regular files and
directories?
c) List 5 options used with ls command.
d) How many types of users can be created in Linux OS?
e) Where ownership and group ownership details are stored?
f) You removed the write permission of a file from a group and others, and
yet they could delete your file. How could that happen?
g) For a group member to be able to remove a file what does she require?
h) Which file attributes are changed when you copy a file from another
user account?
i) Which option do you use for with kill to make sure that process is killed?
j) How do you display signal list?
k) Can you kill processes of other users?
l) What are the two system calls used to create the process?
m) What is the easiest way of finding out PID of your login shell?
n) How can you remove header file from ps output?
o) Why is ps –f considered to be an intrusion into user’s privacy?
p) When does the login shell spawn another shell?
q) Which is the process that listens on every terminal for a login request?
r) Does ls –l show all the files?
s) Which ls option marks directories and executables separately?
t) How do you obtain complete listing of all files and directories in the
whole system?
u) How do you list files of parent directory?
v) Who can change the attributes of a file or a directory?
w) For a group member to be able to remove a file, what are the
requirements?
x) First create a file. How will you assign all permission to the owner and
remove all permissions from others assuming that default file
permissions are –rw-r--r--?
y) If the file doesn’t have write permission for the owner, can she remove
the file?
z) If the owner doesn’t have write permission on a file but her group has,
can she edit it?
Question 4:
a)
b)
c)
d)
How long can a LINUX file name can be?
Can you have a file past and Past in the same directory?
How will you copy directory structure from bar1 to bar2?
What is the difference between du, df and fdisk commands?
e) With reference of permission, what is the meaning of 544 and umask
002?
f) List 5 differences between Linux and UNIX OS.
g) List the differences between ext2 & ext3 file-systems.
h) List 5 commands to compare files.
Download