06-27-2016
Find and delete
Hi Team,
The following command works fine in AIX 6.1.
find /home/abcd00 -name "*" -mtime +30 -print -exec rm -f {} \;
We are trying to implement a similar logic in Linux 2.6. But it is not working. Can anyone help us out?
Thanks
Krishna
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
All,
I am running a script , which has permision as below
-r-xr-x--- 1 pmgr ffw 11660 Sep 3 2003 ccln
and tring to delete the file in the directory inter
(sys212:pct:/>) ll | grep ^d
dr-xr-xr-x 32 bin bin 8192 Dec 24 03:24 etc
drwxr-xr-x 32... (2 Replies)
Discussion started by: arunkumar_mca
2 Replies
2. UNIX for Dummies Questions & Answers
All,
I have a question .
I have a directoy which have permision like
drwxrwxr-x 5 root cusr 8192 Dec 5 12:50 test
I dont have write permision to delete . inside the directory i am having many files . with permision like
$cd test
... (4 Replies)
Discussion started by: arunkumar_mca
4 Replies
3. UNIX for Dummies Questions & Answers
Hi I have a text file like this name today.txt
the request has been accepted
the scan is successful at following time
there are no invalid packages
5169378 : map : Permission Denied
the request has been accepted
Now what i want do is
I want to search the today.txt file and
if i... (1 Reply)
Discussion started by: gsusarla
1 Replies
4. Shell Programming and Scripting
Hi All,
I would like to fine some entry in a file, if it found, it should remove the same in the same file.
Please some one help me.
need to find and en entry 'bea' from hosts file. If it found it should write it same host file.
but i am not geting it. If i am writing it in new file... (2 Replies)
Discussion started by: bullz26
2 Replies
5. UNIX for Advanced & Expert Users
Hi I have a text file like this name today.txt
the request has been accepted
the scan is successful at following time
there are no invalid packages
5169378 : map : Permission Denied
the request has been accepted
Now what i want do is
I want to search the today.txt file and
if i... (8 Replies)
Discussion started by: gsusarla
8 Replies
6. Shell Programming and Scripting
Ok, new user, relatively new to scripting and need to move to the next stage with awk or sed or both. I have been using them both at a basic level in my script.
I want to find a line, no problem, but then I want to delete everything on that line except for the word I am looking for AND the... (4 Replies)
Discussion started by: derekphl
4 Replies
7. UNIX for Dummies Questions & Answers
hi all ,
i want to find and interactively delete all the files having size greater than 20 bytes using "find" and other commands..... (8 Replies)
Discussion started by: sonu_pal
8 Replies
8. UNIX for Advanced & Expert Users
Hi,
I have a .ksh script which finds all the directories older than 84 days and tries to housekeep. Below is the command used
find * -depth -type d -ctime +84 -exec rm -rf {} \;
The above command lists all the directories ie child and parent directory in descending order which are more... (0 Replies)
Discussion started by: annamalai77
0 Replies
9. Shell Programming and Scripting
Is there any error while executing this script..
#!/bin/bash
FINDPATH=/home/ftpcdr/cdr/192.168.3.91
BACKPATH=/home/ftpcdr/backup
STATUS=$?
cd $FINDPATH
find -type d -mtime +30 -print > $BACKPATH/list.txt # FIND FILES THAT CREATED BEFORE 30 DAYS.
FIRST=$(ls $BACKPATH/list.txt | grep... (5 Replies)
Discussion started by: leo_ultra_leo
5 Replies
10. Shell Programming and Scripting
Hi Team,
Could someone please help me on this ..
While doing my day to day activity I use to delete manually the repeated ones ..
For example 05 & 06 are my hosts.. Now I need to print only 05 and 06, 05-06 is not required.
This is how I generate my report daily ..
DBG-STG1-05... (5 Replies)
Discussion started by: Nallachand
5 Replies
LEARN ABOUT DEBIAN
tm::synchronizable
TM::Synchronizable(3pm) User Contributed Perl Documentation TM::Synchronizable(3pm)
NAME
TM::Synchronizable - Topic Maps, trait for synchronizable resources
SYNOPSIS
# you write an input/output driver
# see for example TM::Synchronizable::MLDBM
package My::WhatEver;
# provides source_in and/or source_out methods
sub source_in { .... }
sub source_out { .... }
1;
# you construct your map class
package MySyncableMap;
use TM;
use base qw(TM);
use Class::Trait qw(TM::ResourceAble TM::Synchronizable My::WhatEver);
1;
# you then use that
my $tm = MySyncableMap (url => 'file:/where/ever');
$tm->sync_in;
# work with the map, etc...
$tm->sync_out;
DESCRIPTION
This trait implements the abstract synchronization between in-memory topic maps and the resources which are attached to them, i.e. files,
web pages, etc. whatever can be addressed via a URI. Consequently, this trait inherits from TM::ResourceAble, although Class::Trait does
not do this for you (sadly).
The trait provides the methods "sync_in" and "sync_out" to implement the synchronization. In this process it uses the timestamp of the map
("last_mod") and that of the resource "mtime".
Unfortunately, the granularity of the two are different (at least on current UNIX systems): for the last modification time values from
Time::HiRes is used. UNIX resources only use an integer.
Note: This needs a bit of consideration from the user's side.
INTERFACE
Methods
sync_in
$tm->sync_in
This method provides only the main logic, whether a synchronisation from the resource into the in-memory map should occur. If the last
modification date of the resource ("mtime") is more recent than that of the map ("last_mod"), then synchronisation from the resource to
the in-memory map will be triggered. For this, a method "source_in" has to exist for the map object; that will be invoked.
[Since TM 1.53]: Any additional parameters are passed through to the underlying "source_in" method.
sync_out
$tm->sync_out
This method provides the logic, whether synchronisation from the in-memory map towards the attached resource should occur or not. If
the last modification date of the map ("last_mod") is more recent than that of the resource ("mtime"), then a method "source_out" for
the object is triggered.
[Since TM 1.53]: Any additional parameters are passed through to the underlying "source_out" method.
SEE ALSO
TM, TM::ResourceAble
AUTHOR INFORMATION
Copyright 20(0[6]|10), Robert Barta <drrho@cpan.org>, All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
http://www.perl.com/perl/misc/Artistic.html
perl v5.10.1 2012-06-05 TM::Synchronizable(3pm)