Linux and X-Windows Programming Lab Exercise 1
Linux and X-Windows Programming Lab Exercise 1
Q1 Explain the output of the following commands: 1. find . name abc && echo file exists 2. ls al / 3. cat file1 file2 > file3 4. echo hello world > /dev/tty 5. wc l < file1 > file2 2> file3 6. man k permission 7. ls -1 ac? | wc -l 8. !wc 9. cat file1 ; cat file2 10. cp i file1 file2 Q2 Give the commands to perform the following: rename the file abc delete the non-empty directory move to users home directory display the machine name and kernel number make the directory a/b/c using single command list the filenames starting with letter p and ending with letter t in /home/user1 directory 7. display all files in topmost directory of linux filesystem 8. display the current working directory 9. create four files a0, a1, a2, a3 using single command 10. Compare two files file1 and file2 and explain the output Q3 Differentiate between the following: 1. File relative and absolute path name 2. /root and / 3. cd ~ and cd 4. && and & 5. Single dot (.) and double dot (..) 6. /bin and /sbin directory 7. who and whoami 8. man and info command 9. external and internal command 10. ? , * and [] metacharacters 1. 2. 3. 4. 5. 6.