Search Results

Search: Posts Made By: srirams
15,087
Posted By srirams
Thanks Yogesh
Thanks Yogesh
8,718
Posted By srirams
Hi can anyone tell me ?
Hi can anyone tell me ?
8,718
Posted By srirams
is it possible to keep files for X days from...
is it possible to keep files for X days from latest date ???
15,087
Posted By srirams
Script for Reading a Password file
How do I Authenticate users with a Password file that I have build using PWP - Password Privacy

Password file contents are as under
bash-2.03$ cat passwd.cf
janes hostname ...
8,718
Posted By srirams
I need to keep files for X days from latest date...
I need to keep files for X days from latest date (not just one day)
on a linux system :)
8,718
Posted By srirams
I need to keep files for X days from latest date...
I need to keep files for X days from latest date (not just one day)
8,718
Posted By srirams
guys, any updates
guys,

any updates
8,718
Posted By srirams
The Script File that I run bash-3.00$ cat...
The Script File that I run

bash-3.00$ cat script.sh
#!/bin/bash
Keepdate=`/bin/ls -ult --full-time| sed 1d | head -1 | awk '{ print $6 }'`

echo $Keepdate

/bin/ls -ult --full-time | grep...
8,718
Posted By srirams
I am running this on linux $uname -a ...
I am running this on linux

$uname -a
Linux hostname.lax 2.6.9-22.ELsmp #1 SMP Mon Sep 19 18:00:54 EDT 2005 x86_64 x86_
64 x86_64 GNU/Linux
8,718
Posted By srirams
bash-3.00$ cat test.sh #!/bin/bash ...
bash-3.00$ cat test.sh
#!/bin/bash
Keepdate=`/bin/ls -ult --full-time| sed 1d | head -1 | awk '{ print $6 }'`

echo $Keepdate

#/bin/ls -ltr | grep -v "$Keepdate" | awk '{print $NF}' | xargs -i...
8,718
Posted By srirams
in my case the directories are /opt/zensd ...
in my case the directories are /opt/zensd

Heres where I want to find the latest timestamp and compare it with files which are more than 2 months older to the latest one and delete it

Should I...
8,718
Posted By srirams
wont help ... it deletes all 2003 timestamp files...
wont help ... it deletes all 2003 timestamp files and 2007 along with the script
8,718
Posted By srirams
#!/bin/bash Keepdate=`/bin/ls -ult --full-time|...
#!/bin/bash
Keepdate=`/bin/ls -ult --full-time| sed 1d | head -1 | awk '{ print $6 }'`

/bin/ls -ltr | grep -v "$Keepdate" | awk '{print $NF}' | xargs -i rm -rf {}
8,718
Posted By srirams
hmmm ... should that delete only 2003 ?
hmmm ... should that delete only 2003 ?
8,718
Posted By srirams
file - script.sh #!/bin/sh #!/bin/bash ...
file - script.sh

#!/bin/sh

#!/bin/bash
Keepdate="/bin/ls -ult --full-time| sed 1d | head -1 | awk '{ print $6 }'"
/bin/ls -ltr | grep -v "$Keepdate" | awk '{print $NF}' | xargs -i rm -rf {}
...
8,718
Posted By srirams
Checking on this
Checking on this
8,718
Posted By srirams
Yes , I saw that .... I am not able to...
Yes , I saw that ....

I am not able to understand how this datecalc can be included with our needs :)
8,718
Posted By srirams
datecalc i dont have bash-2.03$ datecalc ...
datecalc i dont have

bash-2.03$ datecalc
bash: datecalc: command not found

bash-2.03$ /bin/datecalc
bash: /bin/datecalc: No such file or directory
8,718
Posted By srirams
Thanks Madan, I had done this but now I am...
Thanks Madan,

I had done this but now I am working on date math to find out the 60 days ago dates it should delete as compared to the lateset file which was 2007-01-13, which means...
8,718
Posted By srirams
Hey thanks again bash-3.00$ ls -ult...
Hey thanks again

bash-3.00$ ls -ult --full-time| sed 1d | head -1 | awk '{ print $6 }'
2007-02-15

I am working on the above date calculation ... let me know more if you can

Thanks again
8,718
Posted By srirams
Thanks I was looking for Something Like this only...
Thanks I was looking for Something Like this only ...
but you know what I am getting this done on a SUN box

Heres what I get with the ls option :

bash-2.03$ ls -tE
ls: illegal option -- E...
8,718
Posted By srirams
I think u r missing my point : I know how to...
I think u r missing my point :

I know how to get logs deleted after x number of days/months

What I need is :

" let's say the logs files are available for Jan 07, Dec 06, Nov 06, Oct 06
...
8,718
Posted By srirams
Thnaks, I did search for that ...
datecalc is not there in our Production environment...

" Is it possible to see if there are files/dirs where there are difference of 2 months and delete the older once "

Thanks again
8,718
Posted By srirams
Hi Madhan
Could you please redirect me there(datecalc) ... Thanks .
8,718
Posted By srirams
Dleetion of Logs
Can someone suggest on this script :

let's say the logs files are available for Jan 07, Dec 06, Nov 06, Oct 06

the script should identify the latest months logs, i.e Jan 07

it should then...
Showing results 1 to 25 of 26

 
All times are GMT -4. The time now is 03:53 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy