Re: find/list read only files
From: Alan Connor (zzzzzz_at_xxx.yyy)
Date: 06/29/04
- Next message: Dale DeRemer: "email oracle errors"
- Previous message: Charles Demas: "Re: find/list read only files"
- In reply to: Tron Thomas: "find/list read only files"
- Next in thread: Alan Connor: "Re: find/list read only files"
- Reply: Alan Connor: "Re: find/list read only files"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 29 Jun 2004 05:40:25 GMT
On 28 Jun 2004 21:03:30 -0700, Tron Thomas <tron.thomas@verizon.net> wrote:
>
>
> In DOS a person can type:
>
> dir /ar
>
> and it will display all the files in the current directory that has a
> read only attribute.
>
> What is an eqivalent UNIX command that will accomplish the same task?
Unix/Linux permissions are a bit more complex than DOS permissions.
It's simpler if you are looking for files with specific permissions.
find . -type f -perm 440 -maxdepth 1 -print
would find all of the regular files in your current directory with
-r--r----- permissions, which is to say that user and group had
only read permissions and other had no permissions.
ls -l | grep '^-r--r-----'
would accomplish the same thing.
(drop the "-maxdepth 1" if you want it to search through all of
the sub-directories too)
If you wanted to find every file with read-only permissions of every
possible combination, the script gets quite a bit longer.
man find, man chmod, man grep
This is one of the reasons that Unix/Linux are so much more secure
than DOS/Windoze. It's a tradeoff...
AC
- Next message: Dale DeRemer: "email oracle errors"
- Previous message: Charles Demas: "Re: find/list read only files"
- In reply to: Tron Thomas: "find/list read only files"
- Next in thread: Alan Connor: "Re: find/list read only files"
- Reply: Alan Connor: "Re: find/list read only files"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|