Sponsored Content
Special Forums Hardware Filesystems, Disks and Memory Delete file by date or by size Post 17412 by Cameron on Thursday 14th of March 2002 06:00:54 PM
Old 03-14-2002
One suggestion may be that every 10 days that you swap files.
Hence you'd have two files at anyone time providing 20 days of log details (~/LogFile-A & ~/LogFile-B). Every 10 days swap between the two...for instance.

1/ Currently on LogFile-A
2/ 10 Days later swap to LogFile-B
3/ 10 Days later empty LogFile-A and swap to LogFile-A
4/ 10 Days later empty LogFile-B and swap to LogFile-B
5/ ** Keep rotating through steps 3 & 4.

Just a thought.
Quote:
any command that will help me to limit the size of the log file to about 10,000 lines
Try: cat LogFile-A | wc -l
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Find file size and date

Hi in my shell script I have to do this 1. there is a file called testing.txt in /home/report directory If the file size is 0(zero) and date is today's date, then I have to print "Successful" else "Failed". 2. There is a file called number.txt which will have text only one line like this... (10 Replies)
Discussion started by: gsusarla
10 Replies

2. 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

3. Shell Programming and Scripting

delete file by date

Hello everyone, I have a folder with many files.the script (csh) runs daily and adds a new file to the folder.I need to delete the first file added that month so I will have only 30 files left every day. Thanks. (6 Replies)
Discussion started by: offerbukra
6 Replies

4. Shell Programming and Scripting

get file size by date for a directory

Good day Probably a simple script though I am new to attempting to script. I have a directory that I would like to get the size of the files and number of files for each date ie 14 Sep 669 files 1.8g 12 Sep 221 files 500mb Any ideas? Thanks (1 Reply)
Discussion started by: ibaboomer
1 Replies

5. Shell Programming and Scripting

Perl Script to check file date and size

Hi guys, i am new to perl. I started reading the perl documents and try to come up with some logic. I am trying to create a script that would go into a location, search for todays files, then searches for all .txt files from today. If todays not found, its an error If file size is less... (26 Replies)
Discussion started by: DallasT
26 Replies

6. UNIX for Dummies Questions & Answers

Delete a row from a file if one column containing a date is greater than the current system date

Hello gurus, I am hoping someone can help me with the required code/script to make this work. I have the following file with records starting at line 4: NETW~US60~000000000013220694~002~~IT~USD~2.24~20110201~99991231~01~01~20101104~... (4 Replies)
Discussion started by: chumsky
4 Replies

7. Shell Programming and Scripting

Script to Compare file size and delete the smaller

I am pretty new to scripting, so I appreciate your advice in advance. The problem: 100 directories each containing 2 files that have the same extension with random names. The only attribute that discriminates the files is size. I would like to write a script that compares the files for size... (6 Replies)
Discussion started by: JC_1
6 Replies

8. HP-UX

find command to display size and date of a file

Hi, The blow code does not yeild any output. find . -name "*.jar" -o -name "*.ksh" -o -name "*.properties" -name "*.war" -o -name "*.ear" -o -name "*.sh" -o -name "*.cfg" -exec ls -l {} \; I wish to print the filename filesize filedate in HP-UX. Can anyone help ? (9 Replies)
Discussion started by: mohtashims
9 Replies

9. Shell Programming and Scripting

Delete log files content older than 30 days and append the lastest date log file date

To delete log files content older than 30 days and append the lastest date log file date in the respective logs I want to write a shell script that deletes all log files content older than 30 days and append the lastest log file date in the respective logs This is my script cd... (2 Replies)
Discussion started by: sreekumarhari
2 Replies

10. Shell Programming and Scripting

Script to determine Date,TotalFile,total size of file based on date

I have file listed like below -rw-r--r--+ 1 test test 17M Nov 26 14:43 test1.gz -rw-r--r--+ 1 test test 0 Nov 26 14:44 test2.gz -rw-r--r--+ 1 test test 0 Nov 27 10:41 test3.gz -rw-r--r--+ 1 test test 244K Nov 27 10:41 test4.gz -rw-r--r--+ 1 test test 17M Nov 27 10:41 test5.gz I... (5 Replies)
Discussion started by: krish2014
5 Replies
ADUNCORE(1)						      General Commands Manual						       ADUNCORE(1)

NAME
AdunCore - core module of the Adun molecular simulator SYNOPSIS
AdunCore [OPTIONS] DESCRIPTION
This manual page documents briefly the AdunCore command. AdunCore is the core module of the Adun molecular simulator. It is launched automatically from the UL GUI but can be used from the GNU/Linux console as well. Options to AdunCore must be specified as value pairs in the form `-Option Value'. The following options are available: -Template A valid Adun template. This is the only option that is mandatory. -ExternalObjects A dictionary in plist format. Its contents extend the externalObjects section of the template. If there are duplicate keys this dictionary takes precedence. -SimulationOutputDir Directory where simulation data directory will be stored. (Default value: SimulationOutput) -ControllerOutputDir Directory where controller data will be stored. (Default value: ControllerOutput) -CreateLogFiles If YES log files are created. If NO they are not. (Default value: YES) -LogFile File where the program output will be written. (Default value: AdunCore.log) -ErrorFile File where program errors and warnings will be written. (Default value: AdunCore.errors) -RedirectOutput If YES the log files will be moved to the simulation output directory. (Default value: YES) -RunInteractive If YES the simulation loop is spawned as a separate thread. The main thread then enters a run loop and can serve external requests. If NO then interaction is not possible with the simulation. (Default value: NO) -ConnectToAdServer If YES the simulation registers its existance with a local AdServer daemon. This allows the simulation to be viewed and controlled from the Adun GUI. (Default value: NO) SEE ALSO
UL(1), AdunServer(1), GNUstep(7). AUTHOR
AdunServer was written by Michael A. Johnston, I. F. Galvn, Jordi Vill-Freixa, Alexander V. Diemand. This manual page was written by Yavor Doganov <yavor@gnu.org> for the Debian project (but may be used by others). January 19, 2008 ADUNCORE(1)
All times are GMT -4. The time now is 03:23 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy