Finding append only and immutable files

Finding append only and immutable files

Post by Scotty9 » Fri, 20 Oct 2000 04:00:00



I know that ls -o will show the chflag but how do I search through my
files
to see which are immutable or append only?

Also is there an easy command to search for device files?

Scott

 
 
 

Finding append only and immutable files

Post by Drew Laws » Fri, 20 Oct 2000 04:00:00




Quote:>I know that ls -o will show the chflag but how do I search through my
>files
>to see which are immutable or append only?

Seems like 'find' should do this, but I can't find how.  But then,
my ISP is running 2.2.8, so those are the newest man pages I can see
at the moment.

Quote:>Also is there an easy command to search for device files?

You can search for special files with find and -type

    -type t
      True if the file is of the specified type.  Possible file
      types are as follows:

          b     block special
          c     character special
          d     directory
          f     regular file
          l     symbolic link
          p     FIFO
          s     socket

Ah!  I found the 4.0 man pages on the FreeBSD.org site.  You can
search on flags using the -flags option to find.  These should do:

    find / -flags  schg -print
    find / -flags -schg -print

If I read the man page correctly, the first will find files which
have schg as their only flag, which the second will find files
which include schg amoung their flags.

--
|Drew Lawson           | Mrs. Tweedy!                       |

|http://www.furrfu.com |                                    |

 
 
 

Finding append only and immutable files

Post by Christian Weisgerb » Fri, 20 Oct 2000 04:00:00



> I know that ls -o will show the chflag but how do I search through my
> files to see which are immutable or append only?

find(1), option "-flags"

Quote:> Also is there an easy command to search for device files?

find(1), option "-type"

--

 
 
 

Finding append only and immutable files

Post by Scotty9 » Fri, 20 Oct 2000 04:00:00




> > I know that ls -o will show the chflag but how do I search through my
> > files to see which are immutable or append only?

> find(1), option "-flags"

> > Also is there an easy command to search for device files?

> find(1), option "-type"

> --


I should read the man pages on "find". What a novel idea. Thanks for the
tip. I am
relatively new to the unix platform.

Scott