SCIENTIFIC-LINUX-USERS Archives

November 2006

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
FRANCHISSEUR Robert <[log in to unmask]>
Reply To:
FRANCHISSEUR Robert <[log in to unmask]>
Date:
Tue, 21 Nov 2006 20:46:43 +0100
Content-Type:
text/plain
Parts/Attachments:
text/plain (54 lines)
----- Original message from Kenneth A. Schumacher on Tue Nov 21 17:52:31 2006 -----
> 
> 
> Robert,
> 
> One other suggestion.
> 
> FRANCHISSEUR Robert wrote:
> > [...]
> > 
> > cd /; find . -type f -size 0  -printf " %t %s " -print
> 
> Rather than use the dot (.) for specifying where you what find to start 
> working from, spell out the directory where you want it to start.  This 
> is especially true when running a command that removes files/data and 
> running as 'root'.
> 
> Imagine if I type:
> 
> cd /afs/fnal.gov/<some_unreachable_directory>; find . { and then the 
> rest of the command.
> 
> If the directory that I tried to CD into is not accessible for any 
> reason, that 'cd' command will fail.  Then the 'find' command will start 
> running from whatever directory I am currently in.  This can be a very 
> bad thing.  Everyone makes that mistake once in their life.  You have 
> been warned. :-)
> 

       Thank you for this tip Ken, I have a lot of bad habits.

> Also, there is an option on the find command which will limit the files 
> found to the filesystem where you begin your search.  While this is 
> quite useful, I don't know if it will help with the 'shred' command.  As 
> someone else pointed out, it appears that 'shred' followed some links 
> and did it's clean-up work.  Using the option that limits the scope of 
> the find will not place any limits on the scope of 'shred'.
> 
       That was right, I plead guilty.


-- 

                 Best regards,
                               Robert FRANCHISSEUR

 ____ Apollo_gist :-)______________________________________________________
| Robert FRANCHISSEUR - Laboratoire de Météorologie Dynamique -   C.N.R.S. |
| Equipe "R.A.M.S.E.S." - UNIVERSITE P. et M. Curie - Tour 45-55 3ème 315C |
| Boite 99 -        4, place Jussieu        F-75252 PARIS CEDEX 05  FRANCE |
| Phone  : +33 (0)1 44 27 73 87           fax     : +33 (0)1 44 27 62 72   |
| e-mail : robert at lmd . jussieu . fr   http    : //www.lmd.jussieu.fr   |
 -------------------------------------------------------------------------- 

ATOM RSS1 RSS2