Synchronising file access permissions?

Synchronising file access permissions?

Post by Ken Re » Fri, 23 Jun 1995 04:00:00



If I have two files, "a" and "b" say, and I want "b" to have the same
access permissions as "a". What's a good way of doing this from a
shell script?

I just had a quick trawl through the old command list and couldn't see
anything that gave me something that chmod would accept.

What's the obvious thing I'm missing?

Ken

 
 
 

Synchronising file access permissions?

Post by B.A.McCau.. » Sat, 24 Jun 1995 04:00:00



>If I have two files, "a" and "b" say, and I want "b" to have the same
>access permissions as "a". What's a good way of doing this from a
>shell script?

>I just had a quick trawl through the old command list and couldn't see
>anything that gave me something that chmod would accept.

>What's the obvious thing I'm missing?

find. Well actually you may need GNU-find to do this.

chmod ` find a -printf "%m" ` b
--

 .  _\\__[oo       from       | Phones: +44 121 471 3789 (home)

.  l___\\    /~~) /~~[  /   [ | PGP-fp: D7 03 2A 4B D8 3A 05 37
 # ll  l\\  ~~~~ ~   ~ ~    ~ |         A1 93 FE EA BE E3 2A 91


 
 
 

1. Seeking KHow do I get the bit value of a file's file access permissions?

You can use the chmod command to change the file access permissions.
But, is there a command that will let me READ the file permissions of a
file?

What I want to do is copy and update of a file over from one location to
another, but preserve the file permissions of the OLD file and transfer
them to the new.

If I can get ahold of a command that allows me to display/read the file
permissions of a file, this is easy.

Thanks again for any help you can provide.

- Richard Hutnik

--

Visit DocReason's Strategy HQ for free games, reviews, and
support and opponent finding for obscure/orphan games at:
http://www.geocities.com/timessquare/fortress/7537/

--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---

2. CDWriter: Pinnacle RCD5020: anyone have it working?

3. File permissions/access and CHAP - confused newbie!

4. Software

5. NCSA 1.4 giving false "file permissions deny server access" errors

6. Adding ram to 386; Linux box

7. Question on file access permission

8. The 17th SCSI Drive

9. permission denied for root file access

10. File Permissions: Give user access

11. File UID and GID permissions/access

12. file access permissions

13. question on file access permission