SUMMARY:Weird find & rm behaviour

From: Gurugunti, Mahesh <MGurugunti_at_us.nomura.com>
Date: Thu May 02 2002 - 14:31:20 EDT
Thanks to all who gave inputs. Although most of the folks suggested using
-exec and find command combination, it did not work.

Since the NFS mounted filesystem was from IBM mainframe, I believe it has a
different file structure implementation(MVS file structure implementation).
Hence some incompatibilities.

By trial and error, I was able to find a way to overcome the problem. If the
NFS filesystem from IBM mainframe is mounted with "-noac" (no attribute
caching) option, the same old command worked.(# find . -type f -mtime +14
-print | xargs rm -f) .    -exec and find combination works too.

Here is a note from IBM's support knowledge base which MORE or LESS gives
some hint of the NFS problem.


  8) Symptom: Recursive Remove ( rm -rf ) does not always clean
     up the directory. Users receive "Directory not empty"
     messages and may need to issue the command again.
     Due to the uniqeness of MVS file architecture, it is not
     possible to make rm -rf work the same as Sun. Development
     tested and confirmed that this command does work with AIX
     using V2 NFS protocol.


Mahesh




>  -----Original Message-----
> From: 	Gurugunti, Mahesh  
> Sent:	Monday, April 29, 2002 12:05 PM
> To:	'sunmanagers@sunmanagers.org'
> Subject:	Weird  find & rm behaviour
> 
> I am trying to remove the files which are 14 days old as below, when I
> used the combination of find and rm looks like it is removing only one
> file every time I run and not all the files.
> 
> The /usr/App/Ntaps/Trans_data is NFS mounted from a IBM mainframe. 
> 
> Any, clues as to why this is happening?? 
> 
> TIA
> Mahesh
> 
> 
> # pwd
> /usr/App/Ntaps/Trans_data
> # find . -type f -mtime +14 -ls
> 18171  148 -rw-rw-rw-  1 lb       ingadm     150300 Apr 12 21:45
> ./ntaps_daily_cust_acct.0412
> 18143  180 -rw-rw-rw-  1 schepis  users      183366 Apr 11 22:08
> ./ntaps_daily_cust_acct.04120730
> 18152  148 -rw-rw-rw-  1 schepis  users      150300 Apr 12 21:49
> ./ntaps_daily_cust_acct.04150730
> 18123    8 -rw-rw-rw-  1 schepis  users        4509 Apr 11 14:30
> ./ntaps_inact_cust_acct.04111436
> 18126    8 -rw-rw-rw-  1 schepis  users        4509 Apr 11 15:30
> ./ntaps_inact_cust_acct.04111536
> 18132    8 -rw-rw-rw-  1 schepis  users        4509 Apr 11 16:31
> ./ntaps_inact_cust_acct.04111637
> 18136    8 -rw-rw-rw-  1 schepis  users        4509 Apr 11 17:00
> ./ntaps_inact_cust_acct.04111703
> 18153    4 -rw-rw-rw-  1 schepis  users        1002 Apr 12 17:00
> ./ntaps_inact_cust_acct.0412
> 18144    8 -rw-rw-rw-  1 schepis  users        4509 Apr 11 22:08
> ./ntaps_inact_cust_acct.04120730
> 18172    4 -rw-rw-rw-  1 schepis  users        1002 Apr 12 21:49
> ./ntaps_inact_cust_acct.04150730
> 18159    8 -rwxrwxrwx  1 lb       ingadm       6567 Apr 12 17:02
> ./tsy_mark.dat.14998
> 18160    4 -rwxrwxrwx  1 lb       ingadm       1142 Apr 12 17:04
> ./tsy_mark.dat.15426
> 18137    8 -rwxrwxrwx  1 lb       ingadm       7652 Apr 11 17:02
> ./tsy_mark.dat.8637
> 18148  676 -rw-rw-rw-  1 lb       ingadm     691405 Apr 12 03:59
> ./CLEAR/ntaps_clear.flat.used.020412
> 
> 
> # find . -type f -mtime +14 -print | xargs rm -f
> rm: cannot change to /mbs/Trans_data directory: No such file or directory
> 
> 
> # find . -type f -mtime +14 -ls
> 18143  180 -rw-rw-rw-  1 schepis  users      183366 Apr 11 22:08
> ./ntaps_daily_cust_acct.04120730
> 18152  148 -rw-rw-rw-  1 schepis  users      150300 Apr 12 21:49
> ./ntaps_daily_cust_acct.04150730
> 18123    8 -rw-rw-rw-  1 schepis  users        4509 Apr 11 14:30
> ./ntaps_inact_cust_acct.04111436
> 18126    8 -rw-rw-rw-  1 schepis  users        4509 Apr 11 15:30
> ./ntaps_inact_cust_acct.04111536
> 18132    8 -rw-rw-rw-  1 schepis  users        4509 Apr 11 16:31
> ./ntaps_inact_cust_acct.04111637
> 18136    8 -rw-rw-rw-  1 schepis  users        4509 Apr 11 17:00
> ./ntaps_inact_cust_acct.04111703
> 18153    4 -rw-rw-rw-  1 schepis  users        1002 Apr 12 17:00
> ./ntaps_inact_cust_acct.0412
> 18144    8 -rw-rw-rw-  1 schepis  users        4509 Apr 11 22:08
> ./ntaps_inact_cust_acct.04120730
> 18172    4 -rw-rw-rw-  1 schepis  users        1002 Apr 12 21:49
> ./ntaps_inact_cust_acct.04150730
> 18159    8 -rwxrwxrwx  1 lb       ingadm       6567 Apr 12 17:02
> ./tsy_mark.dat.14998
> 18160    4 -rwxrwxrwx  1 lb       ingadm       1142 Apr 12 17:04
> ./tsy_mark.dat.15426
> 18137    8 -rwxrwxrwx  1 lb       ingadm       7652 Apr 11 17:02
> ./tsy_mark.dat.8637
> 18148  676 -rw-rw-rw-  1 lb       ingadm     691405 Apr 12 03:59
> ./CLEAR/ntaps_clear.flat.used.020412
> # 
> 
> 
> At the end of second operation, it removed only the file with the
> timestamp Apr 12 21:45.
> 
> 
> Mahesh
> Nomura Securities International
> WFC 2 , Bldg B 18th Floor
> NYC, New York 10281
> 
> 
-----  This message is for the named person's use only. It may contain
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission. If
you receive this message in error, please delete it and all copies from your
system, destroy any hard copies and notify the sender. You must not,
directly or indirectly, use, disclose, distribute, print, or copy any part
of this message if you are not the intended recipient. Nomura Holding
America Inc., Nomura Securities International, Inc, and their respective
subsidiaries each reserve the right to monitor all e-mail communications
through its networks. Any views expressed in this message are those of the
individual sender, except where the message states otherwise and the sender
is authorized to state the views of such entity. Unless otherwise stated,
any pricing information in this message is indicative only, is subject to
change and does not constitute an offer to deal at any price quoted. Any
reference to the terms of executed transactions should be treated as
preliminary only and subject to our formal written confirmation.
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Thu May 2 14:35:22 2002

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:42:42 EST