Northern India Engineering College, New Delhi Code – ETCS-307 LINUX AND X WINDOWS PROGRAMMING Assignment II Question 1: I) What is the purpose of following commands? a) kill -9 b) init 6 c) ls –all d) cut –d: -f1,3 filename e) cd../.. f) grep “manager” emp_data>file1 2>/dev/null g) 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? Arena Nishant Page 1 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) e) 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? 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. Arena Nishant Page 2 h) List 5 commands to compare files. Question 5: a) What is a mount point? How can a device be mounted automatically? b) What is the purpose of setting quota limits to users? c) How many maximum different file systems can be defined on a disk with four partitions? Note: Last date of submission is 6th September, 2013 Arena Nishant Page 3