Sponsored Content
Top Forums UNIX for Dummies Questions & Answers finding largest files (not directories)? Post 302248029 by vidyadhar85 on Friday 17th of October 2008 12:12:28 AM
Old 10-17-2008
try this..
Code:
find . -type f -exec du -a {} \;|sort -n

 

10 More Discussions You Might Find Interesting

1. Programming

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"... (1 Reply)
Discussion started by: AusTex
1 Replies

2. UNIX for Dummies Questions & Answers

Finding executable files in all directories

This is probably very easy but I would like to know a way to list all my files in all my directories that are readable and executable to everyone. I was told to use find or ls and I tried some stuff but couldnt get it to work. I understand that its dangerous to have files with these permissions for... (4 Replies)
Discussion started by: CSGUY
4 Replies

3. Shell Programming and Scripting

finding largest directories in a filesystem

I'm trying to come up with a way of finding largest directories in a filesystem (let's say filesystems is running ot of space and I need to find what is consuming all the space). If a directory is a single filesystem, then it's easy, I just run "du -sk *| sort -nr". But the problem is, if some... (8 Replies)
Discussion started by: GKnight
8 Replies

4. UNIX for Dummies Questions & Answers

[Solved] Finding the Files In the Same Name Directories

Hi, In the Unix Box, I have a situation, where there is folder name called "Projects" and in that i have 20 Folders S1,S2,S3...S20. In each of the Folders S1,S2,S3,...S20 , there is a same name folder named "MP". So Now, I want to get all the files in all the "MP" Folders and write all those... (6 Replies)
Discussion started by: Siva Sankar
6 Replies

5. Shell Programming and Scripting

finding matches between multiple files from different directories

Hi all... Can somebody pls help me with this... I have a directory (dir1) which has many subdirectories(vr001,vr002,vr003..) with each subdir containing similar text file(say ras.txt). I have another directory(dir2) which has again got some subdir(vr001c,vr002c,vr003c..) with each subdir... (0 Replies)
Discussion started by: bramya07
0 Replies

6. Programming

Finding duplicate files in two base directories

Hello All, I have got some assignment to complete till this Monday and problem statement is as follow :- Problem :- Find duplicate files (especially .c and .cpp) from two project base directories with following requirement :- 1.Should be extendable to search in multiple base... (4 Replies)
Discussion started by: anand.shah
4 Replies

7. Shell Programming and Scripting

Finding non-existing words in a list of files in a directory and its sub-directories

Hi All, I have a list of words (these are actually a list of database table names separated by comma). Now, I want to find only the non-existing list of words in the *.java files of current directory and/or its sub-directories. Sample list of words:... (8 Replies)
Discussion started by: Bhanu Dhulipudi
8 Replies

8. UNIX for Beginners Questions & Answers

Display largest files in multiple directories

Trying to locate the 25 largest files with read/execute world permissions to be displayed from a combination of 4 different directories. I'm rather new at UNIX and trying to learn the basics. This is what I have come up with so far: find /dir1 /dir2 /dir3 /dir4 -perm -u+rx | sort -nr | head... (1 Reply)
Discussion started by: malk71
1 Replies

9. Shell Programming and Scripting

Finding files deep in directories

i need to find a portable way to go through multiple directories to find a file. I've trid something like this: find /opt/oracle/diag/*/alert_HH2.log -printordinarily, i can run the ls command and it will find it: /opt/oracle/diag/*/*/*/*/alert_HH2.log The problem with this approach is... (3 Replies)
Discussion started by: SkySmart
3 Replies

10. UNIX for Beginners Questions & Answers

Finding largest files takes too long

Good evening. because the folder has thousand of files it takes too long and have some trouble to get the largest files and then compress files or delete it, for instance find . -size +10000000c -exec ls -ld {} \; |sort -k5n | grep -v .gz The above commad took an hour and i have to cancel... (10 Replies)
Discussion started by: alexcol
10 Replies
it(8)							      System Manager's Manual							     it(8)

NAME
it - configure a system after installation SYNOPSIS
/sbin/it DESCRIPTION
The it program executes scripts before transferring control of the system to the user, typically before the first user logs in. The it program executes programs that collect information such as system name, passwords, timezone, and current date. A system can be in a run level at any given time; each run level has a specific group of processes that run at that level. The init program operates in one of four run levels: 0, s, 2, or 3. The run level changes when init is invoked by a privileged user. The it program is run from /etc/inittab whenever the system is booted or rebooted, or when a level transition occurs for some other reason, such as within init3. The it program first determines which run level the system is coming up under. Next it turns on shared libraries and swap and then searches for any /sbin/it.d/run-level directories, where run-level names a system run level; for example, 2.d, 3.d, 23.d, and so forth. If any such directories exist, it collects the names of all files in those directories. These files are typically links to files in the /sbin/it.d/bin directory and are created beforehand by itruns(8). After collecting the file names, it sorts them, eliminates duplicate references, orders the names as specified by the data file /sbin/it.d/data/options.mask, executes the files, and finally removes the files it executed. After all the files collected from the run level directories have been handled, it exits. The /sbin/it.d/data/options.mask file contains a single line with a list of file names separated by colons. The it command executes col- lected files in the order in which they appear from left to right in the options.mask file. Programs not listed in the options.mask file are executed after those defined in options.mask. These "unspecified" programs are run in the order into which they were initially sorted; that order is controlled by the LC_COLLATE environmental variable and the specifications in the /usr/lib/nls/loc/locale files. FILES
Specifies execution priorities of files to be run by it Files to be linked by itruns(8) for execution by it SEE ALSO
Commands: init(8), itruns(8), rc0(8), rc2(8), rc3(8), who(1) it(8)
All times are GMT -4. The time now is 12:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy