The script below will display all files that are greaten then one megabyte in size. Note that the size parameter is specified in K-bytes. Of course, you can easily append the xargs of —exec command to automatically remove the large file:. This find command will do a "stats" on all files in a directory structure, showing the total size of all files in the directory.
Thanks, Mohan 15 Replies. Filesystems, Disks and Memory. I'm using the find command and a pipe to awk Not sure if I'm actually getting the largest files from this directory and its subdirectories.
Here is the code I used I'm not sure what options on ls -l will work to give me this. Thanks, igidttam 6 Replies. I want to find the which directory under a directory occupy the maximum size is there is any command to find please help 5 Replies. Finding largest file in current directory? I was hoping to get some assistance with this C program I am working on. The goal is to find the largest file in the current directory and then display this filename along with the filesize.
What I have so far will display all the files in the current directory. But, how do I deal with "grabbing" RedHat Commands. OpenSolaris Commands. Linux Commands. SunOS Commands. FreeBSD Commands. Full Man Repository. In addition to Gnouc answer, you can also use the exec option of find combined with ls -la to get more details.
You should have sudo privileges to do that. Sign up to join this community. The best answers are voted up and rise to the top. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Learn more. Finding all large files in the root filesystem Ask Question. Asked 7 years, 6 months ago. Active 3 months ago. Viewed k times. I tried this: find.
The cookie is used to store the user consent for the cookies in the category "Performance". It does not store any personal data. Functional Functional. Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features. Performance Performance.
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors. Analytics Analytics. Analytical cookies are used to understand how visitors interact with the website.
These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
0コメント