Gerard van Antwerpen wrote: > Hi, > I'm looking for the combination of shell commands that will give me the > combined size of a number of files. > Like the dos dir command gives: 34 files, 390kb. > I want to know the size of a directory, with all its files, and sub-dirs > if applicable. > Must be some piping and grepping out of the ls command. > could some one help?
nothing so complex, you just use the command 'du' - mnemonic for Disk Usage. This prints out the size in blocks of each file in the tree. Add the flag -s for just the sum of the file sizes. for the gruesome gritty details:- man du or info du the command 'ls -l' also gives the info you want on the first line of output. -- C. S.
