Linux: Find the second biggest file/directory in size using commands

Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
Introduction
ind the second biggest file/directory in size using commands
What I have
du /etc/ -hsx * | sort -rh | head -2
This command shows me two lines which, by the options I've chosen, gets me the 2 biggest files/directories inside /etc/.
Question
What if I only want to find the second biggest file? How can I do it?
Thanks for reading.
linux ubuntu command-line
New contributor
WhiteGlove is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |Â
up vote
0
down vote
favorite
Introduction
ind the second biggest file/directory in size using commands
What I have
du /etc/ -hsx * | sort -rh | head -2
This command shows me two lines which, by the options I've chosen, gets me the 2 biggest files/directories inside /etc/.
Question
What if I only want to find the second biggest file? How can I do it?
Thanks for reading.
linux ubuntu command-line
New contributor
WhiteGlove is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Introduction
ind the second biggest file/directory in size using commands
What I have
du /etc/ -hsx * | sort -rh | head -2
This command shows me two lines which, by the options I've chosen, gets me the 2 biggest files/directories inside /etc/.
Question
What if I only want to find the second biggest file? How can I do it?
Thanks for reading.
linux ubuntu command-line
New contributor
WhiteGlove is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Introduction
ind the second biggest file/directory in size using commands
What I have
du /etc/ -hsx * | sort -rh | head -2
This command shows me two lines which, by the options I've chosen, gets me the 2 biggest files/directories inside /etc/.
Question
What if I only want to find the second biggest file? How can I do it?
Thanks for reading.
linux ubuntu command-line
linux ubuntu command-line
New contributor
WhiteGlove is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
WhiteGlove is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
WhiteGlove is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 4 mins ago
WhiteGlove
11
11
New contributor
WhiteGlove is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
WhiteGlove is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
WhiteGlove is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
WhiteGlove is a new contributor. Be nice, and check out our Code of Conduct.
WhiteGlove is a new contributor. Be nice, and check out our Code of Conduct.
WhiteGlove is a new contributor. Be nice, and check out our Code of Conduct.
WhiteGlove is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f480424%2flinux-find-the-second-biggest-file-directory-in-size-using-commands%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password