You are on page 1of 1

1

Use find command to locate from your current directory d1 (i) all files with the extension .c or .CC (ii) all files having the inode number nnnn (You must specify the value of any 4 digit number, example: 9076) (iii) all directories having permissions 666 (iv) all files modified yesterday. Use find command (i) to move all the files modified within the last 24 hours to the directory d1 under your home directory. (ii) locate all files named with txt extension or lst extension in your directory say d1 and remove them interactively. (iii) Locate the file f1 in the current directory tree and then copy it to your own directory d1. (iv) change all directory permissions to 755 and all file permissions to 644 in your current directory tree. Set the last access time of two or more files to one year six months back and remove all the files from current directory which is unaccessed for more than one year.

3 4

Create a file emp.lst and store the employee records in the following form: emp_num | emp_name | emp_designation | emp_department | emp_DOJ | emp_salary
(dd/mm/yy Use sort commands to order the file according to their earning i.e employees with a lower salary should be placed higher in the list. (i) Insert the blank line after each line in a file. (ii) Insert the blank line before each line in a file. Print every line of a file twice (do not use echo or printf commands) Remove all blank lines from a file using sed command. Locate lines 100 to 150 using sed command. Add four lines include <stdio.h>, include <math.h> , include <stdlib.h> and include <conio.h> at the beginning and getch() and } at the end of the program. Delete all leading and trailing spaces in all lines of a file.

5 6 7 8 9 10

You might also like