[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
A request/suggestion for the behavior of chmod -X
From: |
Charles Jie |
Subject: |
A request/suggestion for the behavior of chmod -X |
Date: |
Sat, 7 Mar 2009 10:55:47 +0800 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
Hi,
Situation:
I often need to pull lots of files from Windows boxes or from SD
cards in FAT filesystem filled with photos from digital camera.
The copied files usually have the x-bit enabled, which I hate very
much in Unix-like systems. With it, the colored 'ls' output is not
correct for any highlight like .zip .jpg .mp3 etc..
Problem:
"chmod -x -R *" is not useful because it clears the x-bit of
direcotries and forgets all files in sub-directories.
I checked the man page and hope "chmod -X -R" may help but
disappointed. "chomd -X does the same thing as "chomd -x".
Request:
I believe "chmod -X" should do something different from "chomd -x"
so that the -R can be rescued from its misfortune for the special
combination with -x.
Before it's changed, I can only rely on the following command to do
the thing we expect upon "chmod -X -R":
find -type f -executable -exec chmod -x {} \;
which is so verbose and ungraceful for such a daily practice.
I hope "chmod -X -R" may do that, which is decent way of the
Unix-like.
Ref:
1. I saw some complaints for "chmod -X -R" in the following. They
think the behavior of +X and -X should be *symmetrical*.
http://episteme.arstechnica.com/eve/forums/a/tpc/f/96509133/m/348006021931/inc/-1
2. I'm sorry I can not check the archive of this mailing list before
I post. The search of www.mail-archive.com is case-insensitive
and gets hundreds of matches for "chmod -X"(including those for
chmod -x), which I can not afford to go through.
--
===================================================================
Charles Jie (紀春興) Keya Technologies (開雅科技)
☎ +886 2 2938 2262 (Mobile) +886 920 397 746 Skype: charles.jie
===================================================================
- A request/suggestion for the behavior of chmod -X,
Charles Jie <=