This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: What is the secret to locating files with the 'archive' bit set using 'find'?


On 17 May 2001, at 14:45, malcolm.boekhoff wrote:
> Does anyone know whether there is a secret test that can be made to
> enable the "find" command to locate files on an NTFS disk that have
> the "archive" bit set?


-----------> test.sh
#!/bin/sh
archived=`attrib $1 | cut -c1-1`
if [ "$archived" = "A" ]
then
    exit 0
else
    exit 1
fi
<-----------

$ find . -exec ./test.sh {} \; -print


-----------------+---------------------------------------------------
Craig McGeachie  | #include <cheesy_tag.h>
+61 (410) 774902 | while (!inebriated) c2h5oh = (++bottle)->contents;
-----------------+---------------------------------------------------

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]