06-28-2013
Quote:
Originally Posted by
rbatte1
This may run faster for larger files as ls reads the directory, where wc will actually read the whole file.
This is implementation-dependent, many will not.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello all,
I have a directory filling up. I need to determine the size of the files in the directory. How do I do that, what command should I run when I am in the directory?
Next question, can I expand the partition size? (10 Replies)
Discussion started by: komputersman
10 Replies
2. HP-UX
I'm new to HP-UX and am looking for the command that will allow to me determine the total size of listed files. I'm being told that my backup selection is exceeding my tape drive size and need to determine how much information is being backed up.
Help? (3 Replies)
Discussion started by: rgordon
3 Replies
3. UNIX for Dummies Questions & Answers
Hello!
I'm trying to find out the total file size of a subset list in a directory. For example, I do not need to know the total file size of all the files in a directory, but I need to know what the total size is of say, "ls -l *FEB08*" in a directory. Is there any easy way of doing this?
... (3 Replies)
Discussion started by: tekster757
3 Replies
4. UNIX for Dummies Questions & Answers
If I have a file x.txt that is 8 bytes... I want to enter
>> x.txt
8
I've played around with ls, and du... and they always list the file name. (2 Replies)
Discussion started by: ordano
2 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I have directories with name like:
aaa
bbb
ccc
...
I would like to to see which directories are the largest and then list the files within each. I have success using:
du -ks * | sort -rin | head -n 20
which gives me an output like:
120 bbb
27 ccc
3 aaa
...
I would like... (3 Replies)
Discussion started by: ChatPerdu
3 Replies
6. Shell Programming and Scripting
i have a files in the dir as below.
ls -lR ./.snapshot
5649600512 ./.snapshot/backup/data20080707
6006923264 ./.snapshot/backup/data20080708
5321129984 ./.snapshot/backup/data20080709
6686597120 ./.snapshot/backup/data20080710
7312855040 ... (4 Replies)
Discussion started by: mail2sant
4 Replies
7. UNIX for Advanced & Expert Users
Hi,
One of our internal tool runs cpio command to archive certain files, but I receive an error as follows.
CPIO Failure (operation would block)
When i debugged, i assume that this an error due to block size..
My question are,
How to find the block size in HP-UX??
How to set... (1 Reply)
Discussion started by: vj8436
1 Replies
8. UNIX for Dummies Questions & Answers
Hello,
I have a flat file with a list of files with the path to the file and I am attempting to calculate the filesize for each one; however xargs isn't playing nicely and I am sure there is probably a better way of doing this.
What I envisioned is this:
cat filename|xargs -i ls -l {} |awk... (4 Replies)
Discussion started by: joe8mofo
4 Replies
9. Shell Programming and Scripting
to get the list of file name with size
Example:
rwxrwxrwx 1 cm x 562KB Nov 6 19:22 a
rwxrwxrwx 1 cm x 562MB Nov 6 19:22 a
edit by bakunin: Please view this code tag video for how to use code tags when posting code and data. (5 Replies)
Discussion started by: Jewel
5 Replies
10. HP-UX
how to get the file name list with size descriptive in hp-ux
Required output:
permission link user group size(with MB,KB,GB etc) date time name (7 Replies)
Discussion started by: Jewel
7 Replies
LEARN ABOUT DEBIAN
rdiff-backup-statistics
RDIFF-BACKUP(1) User Manuals RDIFF-BACKUP(1)
NAME
rdiff-backup-statistics - summarize rdiff-backup statistics files
SYNOPSIS
rdiff-backup-statistics [--begin-time time] [--end-time time] [--minimum-ratio ratio] [--null-separator] [--quiet] repository
DESCRIPTION
rdiff-backup-statistics reads the matching statistics files in a backup repository made by rdiff-backup and prints some summary statistics
to the screen. It does not alter the repository in any way.
The required argument is the pathname of the root of an rdiff-backup repository. For instance, if you ran "rdiff-backup in out", you could
later run "rdiff-backup-statistics out".
The output has two parts. The first is simply an average of the all matching session_statistics files. The meaning of these fields is
explained in the FAQ included in the package, and also at http://rdiff-backup.nongnu.org/FAQ.html#statistics.
The second section lists some particularly significant files (including directories). These files are either contain a lot of data, take
up increment space, or contain a lot of changed files. All the files that are above the minimum ratio (default 5%) will be listed.
If a file or directory is listed, its contributions are subtracted from its parent. That is why the percentage listed after a directory
can be larger than the percentage of its parent. Without this, the root directory would always be the largest, and the output would be
boring.
OPTIONS
--begin-time time
Do not read statistics files older than time. By default, all statistics files will be read. time should be in the same format
taken by --restore-as-of. (See TIME FORMATS in the rdiff-backup man page for details.)
--end-time time
Like --begin-time but exclude statistics files later than time.
--minimum-ratio ratio
Print all directories contributing more than the given ratio to the total. The default value is .05, or 5 percent.
--null-separator
Specify that the lines of the file_statistics file are separated by nulls ( ). The default is to assume that newlines separate.
Use this switch if rdiff-backup was run with the --null-separator when making the given repository.
--quiet
Suppress printing of the "Processing statistics from session..." output lines.
BUGS
When aggregating multiple statistics files, some directories above (but close to) the minimum ratio may not be displayed. For this reason,
you may want to set the minimum-ratio lower than need.
AUTHOR
Ben Escoto <ben@emerose.org>, based on original script by Dean Gaudet.
SEE ALSO
rdiff-backup(1), python(1). The rdiff-backup web page is at http://rdiff-backup.nongnu.org/.
Version 1.2.8 March 2009 RDIFF-BACKUP(1)