Using the man pages for ls, sort, and head as references,write a one-line script to list the
Question:
Using the man pages for "ls", "sort", and "head" as references,write a one-line script to list the details of the five largestfiles in the current directory. NOTE: Youcan NOT use the "-S" option of "ls"command. Call the script "top5.sh".
Thus, you should be able to run your "top5" script to get anoutput similar to the following:
% ./top.sh 5
and get a result like
-rwxr-xr-x 1 root root 17935 May 9 2005 biggest-file
drwxr-xr-x 2 root root 4096 Jan 22 15:40 tie-for-2a
drwxr-xr-x 2 root root 4096 Dec 10 11:13 tie-for-2b
drwxr-xr-x 2 root root 4096 Dec 10 11:13 tie-for-2c
-rwxr-xr-x 1 root root 2371 Oct 31 2004 5th-largest
Turn in the script (not the list!).
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill