Sponsored Content
Top Forums UNIX for Dummies Questions & Answers calculate directory size by year of file Post 302090440 by igidttam on Monday 25th of September 2006 04:30:19 PM
Old 09-25-2006
I tried your code and it doesn't total by year. It does it by month.
Looks like it's all the same. There should be a different number of total bytes per year


> find . -type f -ls | nawk '{arr[$8] += $7} END {for (i in arr) prin
tf("%s -> [%d]\n", i, arr[i])}'

Apr -> [2147483647]
Jun -> [2147483647]
5 -> [0]
25 -> [0]
Oct -> [2147483647]
Sep -> [2147483647]
Nov -> [2147483647]
Mar -> [2147483647]
May -> [2147483647]
Dec -> [2147483647]
Jan -> [2147483647]
Aug -> [2147483647]
Jul -> [2147483647]
Feb -> [2147483647]
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

how to calculate the file size?

HI, Can somebody please tell me how many bytes make a KB & MB. ThANKS. Rooh.:( (3 Replies)
Discussion started by: rooh
3 Replies

2. Shell Programming and Scripting

How to calculate file's size in directory and subdirectory

Hi, I have written one script to calculate total space of all file in one directory, ignoring subdirectory, it works fine. Now, I've been trying to calculate all files which includes files in any subdirectories. I use recursive function to do this, but it can work only if there is only one... (4 Replies)
Discussion started by: KLL
4 Replies

3. UNIX for Dummies Questions & Answers

Create Year directory, date subdirectory and archive the file

Hi, After checking all the UNIX threads, I am able to come up with a solution so far. I am working on a shell script where it moves the files to a certain directory. The conditions to check are 1) Check if the file exists in the current directory. 2) Check if the destination directory... (2 Replies)
Discussion started by: madhunk
2 Replies

4. UNIX for Dummies Questions & Answers

move all 2008 year's file to destination directory

I am trying to move file created/modified in 2008 year to <new directory>. But trapped badly in Xargs {}. Looks like mv is not getting destination file properly. It assumes source file s to be destination directory n gives me erroir. "Target must be a directory" Run- #/home/mktrisk: find... (4 Replies)
Discussion started by: kedar.mehta
4 Replies

5. Solaris

Directory size larger than file system size?

Hi, We currently have an Oracle database running and it is creating lots of processes in the /proc directory that are 1000M in size. The size of the /proc directory is now reading 26T. How can this be if the root file system is only 13GB? I have seen this before we an Oracle temp file... (6 Replies)
Discussion started by: sparcman
6 Replies

6. Shell Programming and Scripting

How to delete some of the files in the directory, if the directory size limits the specified size

To find the whole size of a particular directory i use "du -sk /dirname".. but after finding the direcory's size how do i make conditions like if the size of the dir is more than 1 GB i hav to delete some of the files inside the dir (0 Replies)
Discussion started by: shaal89
0 Replies

7. Shell Programming and Scripting

Find a particular directory in multiple file systems and calculate total size

Hello : I need some help in writing a ksh script which will find a particular directory in all the file systems in a server and finally report the total size of the direcotry in all the file systems. Some thing like this.. find /u*/app/oracle -type d -name "product" -prune and then... (1 Reply)
Discussion started by: Sam1974
1 Replies

8. Programming

[c] How to calculate size of the file from size of the buffer?

Hi, Can I find size of the file from size of the buffer written? nbECRITS = fwrite(strstr(data->buffer, ";") + 1, sizeof(char), (data->buffsize) - LEN_NOM_FIC, fic_sortie); Thank You :) (1 Reply)
Discussion started by: ezee
1 Replies

9. Shell Programming and Scripting

How to calculate the total number of weeks from a specify year?

Hi anyone can help? How to calculate total number of weeks from a specify date, for example, 01 Jan 2012. Thx! (2 Replies)
Discussion started by: rayray2013
2 Replies

10. UNIX for Dummies Questions & Answers

Ls directory size reporting byte size instead of file count

I have been searching both on Unix.com and Google and have not been able to find the answer to my question. I think it is partly because I can't come up with the right search terms. Recently, my virtual server switched storage devices and I think the problem may be related to that change.... (2 Replies)
Discussion started by: jmgibby
2 Replies
PNGCHUNKS(1)						      General Commands Manual						      PNGCHUNKS(1)

NAME
pngchunks - print information embedded into a PNG file SYNOPSIS
pngchunks file DESCRIPTION
pngchunks is a program that displays informations from files created according to the Portable Network Graphics file format. EXAMPLE
pngchunks input.png Chunk: Data Length 13 (max 2147483647), Type 1380206665 [IHDR] Critical, public, PNG 1.2 compliant, unsafe to copy IHDR Width: 256 IHDR Height: 256 IHDR Bitdepth: 8 IHDR Colortype: 2 IHDR Compression: 0 IHDR Filter: 0 IHDR Interlace: 0 IHDR Compression algorithm is Deflate IHDR Filter method is type zero (None, Sub, Up, Average, Paeth) IHDR Interlacing is disabled Chunk CRC: -753909967 Chunk: Data Length 6 (max 2147483647), Type 1145523042 [bKGD] Ancillary, public, PNG 1.2 compliant, unsafe to copy ... Unknown chunk type Chunk CRC: 554438993 Chunk: Data Length 9 (max 2147483647), Type 1935231088 [pHYs] Ancillary, public, PNG 1.2 compliant, safe to copy ... Unknown chunk type Chunk CRC: -757235972 Chunk: Data Length 7 (max 2147483647), Type 1162692980 [tIME] Ancillary, public, PNG 1.2 compliant, unsafe to copy ... Unknown chunk type Chunk CRC: 429243611 Chunk: Data Length 831 (max 2147483647), Type 1413563465 [IDAT] Critical, public, PNG 1.2 compliant, unsafe to copy IDAT contains image data Chunk CRC: 1406256926 Chunk: Data Length 0 (max 2147483647), Type 1145980233 [IEND] Critical, public, PNG 1.2 compliant, unsafe to copy IEND contains no data Chunk CRC: -1371381630 SEE ALSO
pngchunkdesc(1), pngcp(1), pnginfo(1). AUTHOR
pngchunks was written by Michael Still <mikal@stillhq.com>. This manual page was written by Nelson A. de Oliveira <naoliv@debian.org>, for the Debian project (but may be used by others). Tue, 31 Jul 2007 17:55:51 -0300 PNGCHUNKS(1)
All times are GMT -4. The time now is 11:11 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy