You are on page 1of 1

Unix Interivew questions

1.List of all the files in current directory order by size.?


Ans: ls l|grep ^-|sort np
2. List of all the files in current directory?
Ans: find. type f
3. Write a command to find all of the files which have been accessed within the
last 30 days.
Ans: find. Type f atime -30
4. List the hidden files in current directory ?
Ans: ls -a1 | grep "^\."
5. In UNIX 50 records are there,i want to retrieve the 20-30 records & i want 23
record which commands we are using?
Ans: cat file1|head -23|tail -1

You might also like