Sponsored Content
Top Forums UNIX for Dummies Questions & Answers finding largest files (not directories)? Post 302248035 by Annihilannic on Friday 17th of October 2008 12:21:37 AM
Old 10-17-2008
If find supports -ls on the remote system, this should be quicker:

Code:
ssh remotesystem 'find . -type f -ls | sort -n -k 7,7' > /tmp/localfile

If not:

Code:
ssh remotesystem 'find . -type f | xargs ls -l | sort -n -k 5,5' > /tmp/localfile

 

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
VMSPREP(LOCAL)															    VMSPREP(LOCAL)

NAME
vmsprep - VMS tape preperation aid SYNOPSIS
vmsprep [-] [name ...] DESCRIPTION
Vmsprep traverses hierarchies of files and prepares them for transportation to VMS. Since ANSI stardard tapes (the VMS standard) do not allow hierarchy, this program provides a method of flattening the hierarchy onto a tape in such a way that it can be unpacked on VMS to recreate the same tree structure. For reasons best not described here, vmsprep will attempt to exclude all RCS and SCCS archives by ignoring all files or directories named 'RCS' or 'SCCS', or files starting with 's.' or ending in ',v'. The output of vmsprep is a pair of files vmsprep.namelist and UNPACK.COM. vmsprep.namelist is a list of files to be placed on the tape in the format required by ansitape. If the first argument is '-' instead of a file or directory name, vmsprep will instead send the namelist to standard output, and place UNPACK.COM in /tmp to avoid attempting to write in the current directory. All of the files except UNPACK.COM will be placed on the tape under cryptic names. UNPACK.COM is a VMS command script which will recreate all of the necessary directories and then move the cryptically named files to their proper place. A typical sequence would be: vmsprep - tree1 tree2 file | ansitape cln trees - Then on a VMS machine mount MFA0: trees copy MFA0:*.*.* * @UNPACK FILES
vmsprep.namelist UNPACK.COM DIAGNOSTICS
A warning is reported if a file or directory name contains a character not permitted in VMS names. The offending character is replaced by 'Z' and vmsprep continues. SEE ALSO
ansitape(l) BUGS
Extra periods in file names may not be dealt with optimally. All files and directories to be moved must be descendants of the current working directory. Absolute path names and paths containing ".." will produce unpredictable results. Since vmsprep uses find(1) internally, it does not follow symbolic links. The exclusion of RCS and SCCS files should be controlled by a command line flag. Assumes VMS v4.0 or greater for long file names. 4/10/85 UCB Local VMSPREP(LOCAL)
All times are GMT -4. The time now is 07:23 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy