answersLogoWhite

0


Best Answer

There are several ways to do this (typical Unix ...).

you could execute the following command:

du | sort -n | tail -6

The 'du' command lists disk usage by listing a file name and size per line, then use the sort command to list numerically, and the last 6 will be the 6 largest.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

14y ago

ls -lS | head -6


Explanation:
"ls -lS": list all files in current directory sorted by size
"|" : pipe - this uses the output of the previous command as the input of the following command
"head -6": display the first 6 lines from stdin

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: List and execute UNIX command to display the sizes of the six largest files in the current directory listed in ascending order of their size?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the command to display your current location in Linux?

pwdThis is short for "Print current directory."


What command on the command prompt will display the sub directories on the current directory?

The command you are looking for is "ls"Also the "dir" command works


How do you identify the working directory in Linux?

The command 'pwd' will identify the full path of the present working directory.


What command will display files starting from z in unix?

Use the command: ls z* for those files in your current working directory.


What dos command display the contents of a directory?

DOSEXAFTERBREAKFAST


What is the Unix command to display the filesizes of a directory?

Once your in the directory you have to type the following: du -a


Which Linux command shows which shell you are in?

to get the current shell :echo $0also Use the command ps with -p {pid} option, which selects the processes whose process ID numbers appear in pid. Use following command to find out what shell you are in:ps -p $$


Write the Linux command to display the information about LS command?

Using man ls will open the manual page for the ls command. The ls command lists the files and folders in the current directory.


What command is used to display your current working directory?

In my Ubuntu terminal, I would type one of these two example commands (there are other commands, but I tend to mainly use the two below).cd change to home-directorypwd means display the path of the current directoryNote: pwd stands for print working directory.


What are the Difference between display and list commands?

display command help to display the single current record in a database where as list command helps to display all the current record which are present in a data base.


Write a UNIX command to display the current date in the form ddmmyyyy?

UNIX command to display the current datedate +'%d/%m/%Y'Niraj sharma


Which utility is used to display the pathname of a current working directory?

pwd