08-27-2009
Help with calculating size of files.
Hi All,
I am very new to shell scripting. I have a text file which is the output of another utility. This text file has a list of SAF files which is basically a list of orphan attachments in the attachments directory. Now I want to read each file name from the file, get its size and repeat this to all files to get the total size of all the files listed together. This will help us know the amount of space these currently occupying. Any help would be highly appreciated.
Thanks in advance.
Cheers,
Rajesh.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I would like to create a script for calculating size and remaining space of a directory automatically every 24 hours, then send an email to report to the admin.
* POSIX and PERL are preferred.
Can anyone help, please? (1 Reply)
Discussion started by: leonall
1 Replies
2. Shell Programming and Scripting
Hi,
I have one file stat.
Stat file contents are as follows: for example.
H50768020040913,00260100,507680,13,0000000643,0000000643,00000,0000
H50769520040808,00260100,507695,13,0000000000,0000000000,00000,0000 H50770620040611,00260100,507706,13,0000000000,0000000000,00000,0000
Now i... (1 Reply)
Discussion started by: davidpreml
1 Replies
3. Programming
Hi,
Is there any way to calculate the size of a built in data type without using 'sizeof' operator? I also don't have the option to read it from std .h file.
regards
Apoorva Kumar (10 Replies)
Discussion started by: apoorvasharma80
10 Replies
4. Shell Programming and Scripting
Hi everybody:
Could anybody tell me how can I do this task in AWK language.
I've two files (file1 & file2) where file1 its last row it has first field value equal that the first row in file2, thyen I want calculate the difference in other fields, and this values apply in file2. This is:
file1:... (6 Replies)
Discussion started by: tonet
6 Replies
5. UNIX for Dummies Questions & Answers
hello dont know if this is the correct forum for this post but i have a question.
i am revising for a exam on operating systems and i have the question...
A system has a 32bit virtual address divided into 2kbyte pages and each entry in the page table is 6 bytes in length.
what is the size... (0 Replies)
Discussion started by: Fortune
0 Replies
6. AIX
Hi
This is the lspv output of my server :
cbspsdb01 #lspv
hdisk0 00c7518d2d512fd4 cdgvg active
hdisk1 00c7518d2dcbc9d6 cdgvg active
hdisk2 00c7518dcda9199a appvg active
hdisk3... (1 Reply)
Discussion started by: samsungsamsung
1 Replies
7. Shell Programming and Scripting
Hey guys.....
I have many files (lets say 100 or more) of same size, and I want to create a new output file and calculate the average of first row fifth column in all files and print it in first row of output file, then 2nd row fifth col in all 100 files and print it in 2nd row of output... (1 Reply)
Discussion started by: CAch
1 Replies
8. Shell Programming and Scripting
I have some files with the following contents.I would like to calculate average of fifth column. How can I do this with awk?
file1
cat 95.9 152 78.0 17.9
rat 67.1 153 36.5 30.6
dog 81.4 154 68.1 13.3
dog 92.0 155 55.5 36.5
rat 73.8 156 23.9 49.9
file2
rat... (4 Replies)
Discussion started by: avina
4 Replies
9. UNIX for Beginners Questions & Answers
hi everyone
i have a backup share mounted with me on solaris 10 which have daily backups. everyday i need to calculate all individual sizes of files and need to report somewhere. e.g i have .rman 7backup files daily . what i need that is there any commnd or variation of du command which can add... (1 Reply)
Discussion started by: janakors
1 Replies
10. UNIX for Beginners Questions & Answers
hi everyone
i have posted this query but i dont where it has gone
i am posting again . my issue is that i have many backup files in a backup nfs share and i need to calculate it size just by adding their individual file sizes which is repetitive jobs. so is there any command or variation of du... (1 Reply)
Discussion started by: janakors
1 Replies
LEARN ABOUT DEBIAN
ripole
RIPOLE(1) General Commands Manual RIPOLE(1)
NAME
ripole - extracts attachments from OLE2 data files (ie, MS Office docs).
SYNOPSIS
ripole -i <ole2_file> -d <directory> [--save-unknown-streams] [--version|-V] [--verbose|-v] [--debug] [--help|-h]
DESCRIPTION
ripole is a small program/library designed to pull out attachments from OLE2 data files.
It can handle most of Microsoft Office documents like "doc" (Word), "xls" (Excel) or "ppt" (Powerpoint).
OPTIONS
-i <ole2_file>
Input OLE2 file (usually any Microsoft Office document).
-d <directory>
Extract attachments to <directory>.
--save-unknown-streams
Extract unknown attachements too.
--version, -V
Print ripOLE version.
--verbose, -v
Print verbose output.
--debug
Print debugging informations.
--help, -h
Show this help.
EXAMPLE
ripole -i xam-doc1.doc -v -d tmp
Decoding filename=short-XAMIME.dat
Decoding filename=mp71.exe
Decoding filename=MPSetup.exe
SEE ALSO
Homepage: http://www.pldaniels.com/ripole/
AUTHOR
This manual page was written by Adam Cecile <gandalf@le-vert.net> for the Debian system (but may be used by others).
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 or any
later version published by the Free Software Foundation.
On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL.
Version 0.2.0 May 2007 RIPOLE(1)