Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to get size of a list of files with specified extension? Post 302460169 by Scott on Wednesday 6th of October 2010 07:12:54 AM
Old 10-06-2010
Hi.

Depending on your OS, and if stat is available:

Code:
$ ll
total 8
-rw-r--r-- 1 scott staff  518 Oct  6 13:10 blah.cpp
-rw-r--r-- 1 scott staff 1503 Oct  6 13:10 main.cpp
 
$ stat -c"%s" *.cpp | paste -sd"+" | bc
2021

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to list files will no extension

Can some one help ...... I want to list files with no extension in directory. I have tried the following ls * That listed all files ls *.* That listed files with extension ls That listed all files Thanks (5 Replies)
Discussion started by: Wing m. Cheng
5 Replies

2. UNIX for Advanced & Expert Users

Command to list Files less than or equal to 2k size

Hi, *.xml files stored on date wise folders. I need to extract *.xml files from all the folders. File size is lessthan or equal to 2K. Please let me know command or some shell program to due this job on linux m/c This is urgent, Thanks in advance - Bache Gowda (3 Replies)
Discussion started by: bache_gowda
3 Replies

3. UNIX for Dummies Questions & Answers

Files list which are more than 300 MB size

Hi, I need to find files list which are more than 300 MB size? My script It should search all inner directories too. How can I proceed? Any idea? (2 Replies)
Discussion started by: redlotus72
2 Replies

4. Shell Programming and Scripting

list the files with size in bytes

hi all plz help in listing the files with size in bytes. thnks -Bali (4 Replies)
Discussion started by: balireddy_77
4 Replies

5. UNIX for Dummies Questions & Answers

How to list files which have same size?

Hi guys, I need to do 100 files comparison after I sorted the files. There are no specific key for sorting so i plan to arrange the files based on the file size. The command that i used to sort the files by size is as per below:- ls -l | sort +4rn | awk '{print $5, $9}' The problem that i... (3 Replies)
Discussion started by: shahril
3 Replies

6. Shell Programming and Scripting

Compare list [ names and size files ]

Hello, I've downloaded a huge amont of files I've got a list of files from a remote server. -rw-r--r-- 1 str661 strem 453465260 Dec 16 15:54 SATRYS2V1_20021218_temp_bias.nc -rw-r--r-- 1 str661 strem 17669468 Dec 16 18:01 SATRYS2V1_20021225_hdyn_bias.nc -rw-r--r-- 1... (9 Replies)
Discussion started by: Aswex
9 Replies

7. UNIX for Dummies Questions & Answers

How to list files with no extension together with *.prog files?

Hi, I know that to list files with no extension, we can use.. ls -1 | grep -v "\." And to list .prog files, we can use.. ls -1 *.prog or ls -1 | grep '.prog$' (4 Replies)
Discussion started by: adshocker
4 Replies

8. Shell Programming and Scripting

List files with *.i extension in a directory and all its subdirectories + 30days old then remove

I need to write a script to : list files with *.i extension in a directory and all its subdirectories + 30days old, save it in a file and then remove (2 Replies)
Discussion started by: lena keung
2 Replies

9. Shell Programming and Scripting

List duplicate files based on Name and size

Hello, I have a huge directory (with millions of files) and need to find out duplicates based on BOTH file name and File size. I know fdupes but it calculates MD5 which is very time-consuming and especially it takes forever as I have millions of files. Can anyone please suggest a script or... (7 Replies)
Discussion started by: prvnrk
7 Replies

10. UNIX for Dummies Questions & Answers

Display the .csv extension files based on .done extension fine

Hi All, I want to fetch the files based on .done file and display the .csv files and Wil take .csv files for processing. 1.I need to display the .done files from the directory. 2.next i need to search for the .Csv files based on .done file.then move .csv files for the one directory ... (2 Replies)
Discussion started by: girija.g6
2 Replies
zipios::ZipInputStreambuf(3)				     Library Functions Manual				      zipios::ZipInputStreambuf(3)

NAME
zipios::ZipInputStreambuf - ZipInputStreambuf is a zip input streambuf filter. SYNOPSIS
#include <zipinputstreambuf.h> Inherits zipios::InflateInputStreambuf. Public Member Functions ZipInputStreambuf (streambuf *inbuf, int s_pos=-1, bool del_inbuf=false) ZipInputStreambuf constructor. void closeEntry () Closes the current entry, and positions the stream read pointer at the beginning of the next entry (if there is one). void close () Closes the streambuf. ConstEntryPointer getNextEntry () Opens the next entry in the zip archive and returns a const pointer to a FileEntry object for the entry. virtual ~ZipInputStreambuf () Destructor. Protected Member Functions virtual int underflow () Detailed Description ZipInputStreambuf is a zip input streambuf filter. Definition at line 18 of file zipinputstreambuf.h. Constructor &; Destructor Documentation zipios::ZipInputStreambuf::ZipInputStreambuf (streambuf *inbuf, ints_pos = -1, booldel_inbuf = false) [explicit] ZipInputStreambuf constructor. Parameters: inbuf the streambuf to use for input. s_pos a position to reset the inbuf to before reading. Specify -1 to read from the current position. del_inbuf if true is specified inbuf will be deleted, when the ZipInputStreambuf is destructed. Definition at line 18 of file zipinputstreambuf.cpp. zipios::ZipInputStreambuf::~ZipInputStreambuf () [virtual] Destructor. Definition at line 82 of file zipinputstreambuf.cpp. Member Function Documentation void zipios::ZipInputStreambuf::close () Closes the streambuf. Definition at line 42 of file zipinputstreambuf.cpp. void zipios::ZipInputStreambuf::closeEntry () Closes the current entry, and positions the stream read pointer at the beginning of the next entry (if there is one). Definition at line 29 of file zipinputstreambuf.cpp. ConstEntryPointer zipios::ZipInputStreambuf::getNextEntry () Opens the next entry in the zip archive and returns a const pointer to a FileEntry object for the entry. Returns: a const FileEntry * containing information about the (now) current entry. Definition at line 45 of file zipinputstreambuf.cpp. Author Generated automatically by Doxygen for Zipios++ from the source code. Zipios++ Mon Oct 10 2011 zipios::ZipInputStreambuf(3)
All times are GMT -4. The time now is 08:50 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy