Moving a file based on size


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Moving a file based on size
# 8  
Old 08-16-2011
Try deleting print0 and -d ''. You can get the job done without problem if your file names have not special characters like newline or similar.

Regards,
Birei.
This User Gave Thanks to birei For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Split the File based on Size

I have a file that is about 7 GB in size. The requirement is I should split the file equally in such a way that the size of the split files is less than 2Gb. If the file is less than 2gb, than nothing needs to be done. ( need to done using shell script) Thanks, (4 Replies)
Discussion started by: rudoraj
4 Replies

2. Programming

Perl - Moving file based upon filesize in folder

Hi I'm trying to look through a series of directories in A folder, lets just call it A: for example: A/1 A/2 A/3 Etc and I wish to move the files in the folder if they are bigger than a certain size into a structure like below: A/TooBig/1 A/TooSmall/1 A/TooBig/2 A/TooSmall/2... (1 Reply)
Discussion started by: PerlNewbRP
1 Replies

3. Shell Programming and Scripting

Moving files based on file name

Hi All, I have multiple files in the folder, I want to move those files into the other folder on based of name File names: Template_server1_01==> Template_server1_02==>To one directory /Server1 Template_server1_03==> Template_server2_01==> Template_server2_02==>To one... (9 Replies)
Discussion started by: sharsour
9 Replies

4. Shell Programming and Scripting

Moving files based on size (string to integer)

I have a log file that I want to archive out as it reaches 100MB. I am using the following to get the file size into a variable but get the error "line 5: filesize=$(wc -c < logfile.log) if then echo "is greater than 100M" else echo "is less than 100M" fi I'm sure there's something... (2 Replies)
Discussion started by: Flakman
2 Replies

5. Shell Programming and Scripting

Moving files based on file creation

Hi, I have a directory having so many number of files. Now I want to move the files which are older than one month (lets say) from this directory to another directory (say BKP dir). Simply, if file is olderthan one month move it from source1 dir to BKP1 dir. My file names doesn't have... (7 Replies)
Discussion started by: karumudi7
7 Replies

6. Shell Programming and Scripting

Split file based on size

Hi Friends, Below is my requirement. I have a file with the below structure. 0001A1.... 0001B1.. .... 0001L1 0002A1 0002B1 ...... 0002L1 .. the first 4 characters are the sequence numbers for a record, A record will start with A1 and end with L1 with same sequence number. Now the... (2 Replies)
Discussion started by: diva_thilak
2 Replies

7. UNIX for Dummies Questions & Answers

ftping a file based in the size

Hi, I want to connect to a remote machine using FTP, check for the size of a file there. If it is 0 bytes, then there is no need to ftp else i have to ftp the file. Any help will be highly appreciated. (7 Replies)
Discussion started by: vikas.rao11
7 Replies

8. Shell Programming and Scripting

file moving based on file content

Hi All my scenario is as follows... I have the following three files in directory alphabet, containing the respective character string... Filename Character String alphabet01.dat AAA alphabet02.dat BBB alphabet03.dat CCC based on... (12 Replies)
Discussion started by: melvyn.cochrane
12 Replies

9. Shell Programming and Scripting

Moving file to directory based on condition.

Can any one help me to correct following script. I have 2 directories DropZone and ProcessZone. File pattern is *VEHDESCSUM*. Finding the 'no of files' in DropZone directory using ls *VEHDESCSUM* |wc -l If DropZone has more than one file or 0 files then exit 1 If DropZone has one file then... (2 Replies)
Discussion started by: ramanagh
2 Replies

10. UNIX for Dummies Questions & Answers

Mail based on file size

Hi Friends, i am trying to write a shell script which will check for the logfile size. if the content of the logfile is wc -l >=1 then send mail with log file as attachment.else do nothing. i'm trying the below code can any one help on this if ] then (echo "`cat... (2 Replies)
Discussion started by: rajendragora
2 Replies
Login or Register to Ask a Question
PAPERCONFIG(8)						   Linux Administrator's Manual 					    PAPERCONFIG(8)

NAME
paperconfig - configure the system default paper size SYNOPSIS
paperconfig [ -v,--version ] [ -h,--help ] [ -p, --paper papername | --force ] DESCRIPTION
paperconfig sets the system (or default) paper to be used by tools using the papersize file. It can either ask interactively for the paper to use or be called non-interactively by scripts. When the paper size has been changed, paperconfig notifies other packages of the change by running the scripts in the /etc/libpaper.d directory. OPTIONS
-v,--version Print the version of paperconfig and exit. -h,--help Print help about usage and exit. -p, --paper papername Use papername if possible. If papername is not a valid paper, print an error message and exit. --force Force interactive selection of the system paper even if the actual paper is a valid one. ENVIRONMENT
PAPERCONF Full path to a file containing the paper size to use; this file will be rewritten with the system paper size. FILES
/etc/papersize Contains the name of the system-wide default paper size to be used if the PAPERSIZE variable is not set. /etc/libpaper.d Directory of scripts to run after the paper size has been changed. This package puts no scripts here, but other pack- ages may. AUTHOR
Yves Arrouye <arrouye@debian.org> SEE ALSO
paperconf(1) papersize(5) Debian/Linux 5 January 2005 PAPERCONFIG(8)