LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   rox + recursive permission change for FILES only? (https://www.linuxquestions.org/questions/linux-newbie-8/rox-recursive-permission-change-for-files-only-216366/)

NonSumPisces 08-11-2004 04:07 PM

rox + recursive permission change for FILES only?
 
To my understanding, you have to have execution permission to browse directories, true?
I want some of my user accounts to be able to browse and read a couple of dirs and their content, but rox won't recognize files for what they are if they have exec perms (ie, click an avi, nothing happens if it's got exec perm). Can anyone explain to me how I can use chmod recursivly so that only the dirs them selves are executable, but not the files in them, or vice versa, remove the exec perms for the files in all subdirs without changing any perms for the dirs themselves? I don't want to have to go through 220 gig of swag dir by dir you know :(

Tinkster 08-11-2004 04:13 PM

I don't know about ROX, but the commandline ... :)

find /<startdir> -type d -exec chmod a+x {} \;
find /<startdir> -type f -exec chmod a-x {} \;



Cheers,
Tink

NonSumPisces 08-11-2004 05:05 PM

Thx, that's what I meant :) Sorry for not being clear in what I meant, I'm a bit tired, dug a three feet deep, six by six feet wide hole in the garden two hours ago :)

NonSumPisces 08-11-2004 05:10 PM

Quite creative using find in conjunction with chmod. Can you explain the syntax to me?

Tinkster 08-11-2004 05:55 PM

Heh ... a man find would have done ;)

Code:

find -type <x> -exec <any command> {} \;
    xxxxxxxxx xxxxx              xxxxx 
    |          |                  |
lets you speci- |-------------------
fy what you're  |
after, d = dir, |
f = ordinary    \exec lets you execute
file, man for    arbitrary commands with the
more ;)          found files. You can use anything
                you can do from a command-line there.
                {} is the placeholder for the found
                file. \; tells find that this is where
                exec stops.


Cheers,
Tink

NonSumPisces 08-11-2004 06:14 PM

Hehe, thx. As I said, I'm tired, didn't think of that :P

Cheers.

Tinkster 08-11-2004 06:36 PM

Quote:

Originally posted by NonSumPisces
Hehe, thx. As I said, I'm tired, didn't think of that :P
That's an explanation, not an excuse ;)

Btw, I never knew that Sweden uses imperial
measures! :)


Cheers,
Tink

NonSumPisces 08-11-2004 07:04 PM

Hehe, I wasn't looking for an excuse :p About that measurement system: We use the metric system, as most of the rest of europe do :) I used the imperial system now because if my memory doesn't fail me, most commonwealth countries still use it (NZ is short for New Zeeland and is part of the commonwealth, right? I'll feel very stupid if I'm wrong ^_^ ) Besides, I've spoken with many people from countries which still uses the imperial system, mostly americans, and I once got the question "how many millimmeters is there in one centimeter?". Before I could answer, another american jumped in and said, and I quote: "One centimeter is aprox. 10 millimeters, +/- a few"... Then a german quickly replied, and again I quote: "One centimeter is PRECISELLY 10 millimeters, nothing more, nothing less. This is why the metric system is so superior to your obsolete system, we don't have to fight about who's got the longest 10 inch pecker :p"

:D

Tinkster 08-11-2004 07:10 PM

Quote:

Originally posted by NonSumPisces
I used the imperial system now because if my memory doesn't fail me, most commonwealth countries still use it (NZ is short for New Zeeland and is part of the commonwealth, right? I'll feel very stupid if I'm wrong ^_^ )
Heh ... well, I'm not quite sure which bit you were referring
to when you said "I'll feel very stupid if I'm wrong ^_^ )" ...
NZ (New Zealand) is indeed part of the commonwealth, but
we (along with the majority, including the UK to the best of
my knowledge) have switched to the metric system a while ago :)



Cheers,
Tink

P.S.: Just to be fair: many Kiwi's still talk about their height
and weight in feet and stone ;)

NonSumPisces 08-11-2004 07:21 PM

Hehe, alrighty then, I'm just a little bit stupid :D But just to be just a little bit more fair than that, when I was in the UK last time, they used "miles", "yards", "ounces" and the lot :)
Guess some people are just stuck in the old system, though the mteric system is the official one :)
What's that proverb? "You can't teach an old dog to sit"? :D
Sweden used to have a sort of commonwealth a century or so ago too :) It was called "The Kalmar Union" after the Swedish city in which the the treaties were signed. That was, ofcourse, before the Finns got "stolen" from us by the Russians and the Norwegians got all separatist 'n stuff :D
I think the commonwealth is quite cool, espicially the yearly sports championchips between the armed forces of the commonwealth countries :)


All times are GMT -5. The time now is 05:38 PM.