finding files bigger than 2G


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting finding files bigger than 2G
# 1  
Old 12-20-2006
finding files bigger than 2G

find /base/directory -size +2048M > /tmp/tempfile


1] is there an option to specify the size in Gb
2] the output lists files with size such as:
1152157

(doing ls -l so I guess it is in bytes) So I am missing something here because this file has a size below 2 Gb.

Any hints??

thx.
# 2  
Old 12-20-2006
ls -l | awk '{ s= $5/1073741824; if(s >= 2){print $0} }'

Last edited by aju_kup; 12-20-2006 at 05:01 AM..
# 3  
Old 12-20-2006
What is 3072?
# 4  
Old 12-20-2006
Quote:
Originally Posted by melanie_pfefer
find /base/directory -size +2048M > /tmp/tempfile


1] is there an option to specify the size in Gb
2] the output lists files with size such as:
1152157

(doing ls -l so I guess it is in bytes) So I am missing something here because this file has a size below 2 Gb.

Any hints??

thx.
please see the man page of your find command and see if there is -size n[cwbkMG] option.
My version of find can specify -size in Gb, as stated in my man page.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. IP Networking

Can not send files bigger than 1350 bytes

I am sending files over WAN from Ubuntu 8 to OSR 5.07 on regular basis without a problem using ftp and rsync. Today I can not send anything bigger than ~1350 bytes, tried ftp, rsync, scp, it becomes frozen and I have to kill the process. Smaller files are sent without issue. Telnet and ssh... (1 Reply)
Discussion started by: migurus
1 Replies

2. Shell Programming and Scripting

Finding value bigger than zero in all columns

Hi everybody, I am a complete novice and please forgive if its answered gazillion times I have a file which looks like this 1 0 2 0 0 0 0 0 0 3 0 1 18 2 6 0 1 7 0 2 4 0 0 0 1 17 16 1 1 0 0 I have to add... (4 Replies)
Discussion started by: amits22
4 Replies

3. Shell Programming and Scripting

Finding files with wc -l results = 1 then moving the files to another folder

Hi guys can you please help me with a script to find files with one row/1 line of content then move the file to another directory my script below runs but nothing happens to the files....Alternatively Ca I get a script to find the *.csv files with "wc -1" results = 1 then create a list of those... (5 Replies)
Discussion started by: Dj Moi
5 Replies

4. AIX

aix 4.2 "compress" : any issues with files bigger then 1Gig ?

To speed up our backups, I found a way to compress all the backups files without running out of space. But before starting to use this in our procedures, I want to know if the command 'compress' has any issues in AIX 4.2 with files bigger then 1Gig. Our backup files have sizes ranging between 600Mg... (1 Reply)
Discussion started by: Browser_ice
1 Replies

5. Shell Programming and Scripting

Checking files size and deleting if bigger than x

Hello , I have to write a crontab line make a check on a file and, if bigger than 2Gb, to stop apache daemon, delete the file and restart apache . Someone have suggestions ? Thanks (2 Replies)
Discussion started by: gogol_bordello
2 Replies

6. Shell Programming and Scripting

sort files by date, delete oldest, if total size bigger than

hello people i need your help please i want to achieve the following with the simplest, most efficient shell-tools: i have a directory with a lot of files from users. the script should check which partition the dir is on if the partition with the directory is more than 90% full ... (2 Replies)
Discussion started by: scarfake
2 Replies

7. Solaris

HDD cloned to a bigger one

Hello, I just cloned a 80 GB HDD(running Solaris 10) to an 320 GB HDD using g4u disk-to-disk method. Now Solaris is seeing may 320 GB HDD like 80 GB. Exactly like the old one. Could you tell me, please, how do I convince Solaris that my HDD is bigger? I would like to keep all slices as... (5 Replies)
Discussion started by: mirciulicai
5 Replies

8. Shell Programming and Scripting

finding duplicate files by size and finding pattern matching and its count

Hi, I have a challenging task,in which i have to find the duplicate files by its name and size,then i need to take anyone of the file.Then i need to open the file and find for more than one pattern and count of that pattern. Note:These are the samples of two files,but i can have more... (2 Replies)
Discussion started by: jerome Sukumar
2 Replies

9. AIX

How to tar a files that bigger than 2 gig in AIX 5.2?

Hi, I have a question. Im trying to tar a files that the size is bigger that 2 gig. When i tried to tar it, i got an error says "eached end-of-file before expected" How can i solve this? Thanks and Regards (6 Replies)
Discussion started by: owangecounty
6 Replies

10. UNIX for Dummies Questions & Answers

finding files

I need to write a script that will find all of the files in my current directory that contain a html extension that contains a URL with my user ID as a command line argument and have yhe script display the names of the files selected along with a count of the files found. I'm totally lost ???? Any... (4 Replies)
Discussion started by: jseiple
4 Replies
Login or Register to Ask a Question