Solved

Linux cli exercises

Posted on 2011-03-14
2
338 Views
Last Modified: 2012-05-11
Hi Experts!

For a course I'm giving, I'm looking for some Linux CLI exercises. Something like:
"Find the dir, starting from /, wich contains the most (bytes), and list the 10 largest files from that dir, sorted from heavy->light, and numbered"
The answer should be something like:
sudo find `sudo du -cx --max-depth=1 | sort -g | tail -3 | head -1 | cut -f 2` -type f -exec du {} + | sort -gr | head -10 | cat -n
We're using Debian and/or Ubuntu.
I will share points between useful suggestions.
thanks!
0
Comment
Question by:wolfje_xp
  • 2
2 Comments
 
LVL 31

Accepted Solution

by:
farzanj earned 500 total points
ID: 35127727
0
 
LVL 31

Assisted Solution

by:farzanj
farzanj earned 500 total points
ID: 35127877
0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Background Still having to process all these year-end "csv" files received from all these sources (including Government entities), sometimes we have the need to examine the contents due to data error, etc... As a "Unix" shop, our only readily …
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question