The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
how to find ot ctime , mtime ,atime nilesrex Shell Programming and Scripting 5 11-08-2008 04:35 PM
Problem with find command when used with mtime arunkumar_mca UNIX for Dummies Questions & Answers 4 01-08-2008 12:37 AM
problem with find and mtime arunkumar_mca UNIX for Dummies Questions & Answers 4 11-05-2007 07:41 AM
find . -mtime topcat8 UNIX for Dummies Questions & Answers 1 04-26-2006 11:55 AM
find -mtime off by one day? ceanntrean UNIX for Dummies Questions & Answers 4 08-24-2005 08:46 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-08-2002
yls177
Guest
  
 

Posts: n/a
Bits: 0 [Banking]
find -mtime +2? means after 48 hours..

find /oracle/sydf/arch -mtime +2 -name 'sydf*' -type f -exec rm -f {} \;

this means after 48 hours remove the files.....

i am not sure about the command

type f -exec rm -f {} \;

does it means, check for files, then execute it ..

then what doesw the {} and \ and ; means ?
  #2 (permalink)  
Old 11-08-2002
saabir saabir is offline
Registered User
  
 

Join Date: Sep 2002
Location: UK
Posts: 65
rm -f means force the removal of the file/directory (in this instance the file).

The `find` command can return a number of matches, so in order to action the -exec statement on each of those matches you have to supply the `{}` syntax which tells find to execute what follows the -exec statement on each of those matches, the `\;` is simply terminating the command on each of those matches, the `\` character escapes the character `;` from the shell.
Closed Thread

Bookmarks

Tags
mtime

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 09:42 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0