I have to make a script to purge logs in a directory (this script will run automatically every day) and this script has to keep just the 30 last files.
So I want it to count all the files in the directory, find the 30 most recents and delete the others.
I just started shell scripting and I'm not very good ^^
I tried this :
but the find rm doesn't work, my variable is good the echo displays the files to delete, but the rm does't work...
so if anyone has an idea?or a better solution (I gues there must be a lot^^)
thanks for the help
Last edited by Franklin52; 08-26-2010 at 01:38 PM..
Reason: Please use code tags
Being new I had my focus in the wrong place and typed in xterm instead of <If you can't guess, good>.
Can I purge xterm so that this word no longer appears using up or down arrows? (1 Reply)
Hi ,
I want to purge 7 days older data from a list of data sorted on date in a log file...
Can anyone provide me with the shell script for the same..
Thanks,
Jaz (1 Reply)
Hi,
I am trying to write a script which would go search and get the info from the logs based on yesterday timestamp and write yesterday logs in new file. The log file format is as follows:
""""""""""""""""""""""""""... (3 Replies)
Hi all,
Consider i have a directory /tmp/test and inside this directory i have the following files:
1.svf.tmp
2.svf.tmp
3.svf.tmp
How can i remove the last four characters of every file in irder for the directory to be as:
1.svf
2.svf
3.svf
I use the following command but id doesn't... (6 Replies)
Hi,
At work we have backups on a ftp.
I want to view 4 last files saved (their names, dates, and weight).
how can i achieve this goal using simplest way ?
Thank's. (3 Replies)
Hi,
sorry if there already a thread about this, I did a little bit of digging but haven't found exactly what I want.
I have a java application on a glassfish server who crash from time to time :D
I need a script to allert me if there's a error like "java heappspace" or "out of memory" in the... (5 Replies)
From morning we are facing some issues in tablespaces in oracle9i.
Tried deleting some huge records... but even thought it is still giving tablespcases in full.
Then i tried and googling ... found we need to purge recyclebin of oracle..
but thats not woking in oracle9i...
can any one... (1 Reply)
I have these commands that help me find and delete files over certain days.
How can I build a menu to list the files, and then hit y for yes to delete or no?
find /logs/212/abinitio/prod/mfs/partitions/part0/mfs_12way_001/mfs_12way/sncrpt/main/ -name "*dat" -mtime +1 -exec ls -ltr {} \;
find... (3 Replies)
Hello,
i would like to know what is the use of that command
apt-get install --purgeI understand the use of --purge while using with remove parameter, but i don't get it when it's about installing.
Enlight me please ! Thx
---------- Post updated 09-03-16 at 11:35 AM ---------- Previous... (0 Replies)
Appreciate help for the below issue.
Im using below code.....I dont want to attach the logs when I ran the perl twice...I just want to take backup with today date and generate new logs...What I need to do for the below scirpt..............
1)if logs exist it should move the logs with extention... (1 Reply)
Discussion started by: Sanjeev G
1 Replies
LEARN ABOUT DEBIAN
polyorb-config
POLYORB-CONFIG(1) PolyORB documentation POLYORB-CONFIG(1)NAME
polyorb-config - script to get information about the installed version of PolyORB.
SYNOPSIS
polyorb-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version|-v] [--config] [--libs] [--cflags] [--idls] [--help]
DESCRIPTION
polyorb-config is a tool that is used to determine the compiler and linker flags that should be used to compile and link programs that use
PolyORB.
OPTIONS
polyorb-config accepts the following options:
--prefix[=DIR]
Output the directory in which PolyORB architecture-independent files are installed, or set this directory to DIR.
--exec-prefix[=DIR]
Output the directory in which PolyORB architecture-dependent files are installed, or set this directory to DIR.
--version|-v
Print the currently installed version of PolyORB on the standard output.
--config
Print the configuration of the currently installed version of PolyORB on the standard output.
--libs Print the linker flags that are necessary to link a PolyORB program.
--cflags
Print the compiler flags that are necessary to compile a PolyORB program.
--idls Print the flags to set up path to CORBA's IDL for idlac.
--with-appli-perso=P,P,P
Restrict output to only those flags relevant to the listed applicative personalities.
--with-proto-perso=P,P,P
Restrict output to only those flags relevant to the listed protocol personalities.
--with-corba-services=S,S,S
Restrict output to only those flags relevant to the listed services.
--help Print help message.
AUTHORS
The PolyORB team, polyorb-devel@lists.adacore.com.
SEE ALSO
The PolyORB WWW page, http://libre.adacore.com/polyorb/
PolyORB team April 26, 2007 POLYORB-CONFIG(1)