Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 10-14-2003, 03:40 AM   #1
Registered: Sep 2003
Location: Bulgaria
Distribution: Ubuntu 9.10, FreeBSD 7.2
Posts: 459

Rep: Reputation: 31
Changing flags only for directoires

I want to chmod all direcotries on one dir, but not files. How can be done that?
I copy tar.gzs from my FAT32 partition. Thy are all chmodded to 777. I want to remove the 'x' flag, but when I do $ chmod a-x * it changes the directories flags too.. that makes them unbrowsable.
Old 10-14-2003, 04:10 AM   #2
Senior Member
Registered: Sep 2003
Location: Sweden
Distribution: Debian
Posts: 3,032

Rep: Reputation: 58
Do something like chmod a-x *.tgz if you want all tgz files for be stripped of the exec bit.

Old 10-14-2003, 04:49 AM   #3
Registered: Sep 2003
Location: Bulgaria
Distribution: Ubuntu 9.10, FreeBSD 7.2
Posts: 459

Original Poster
Rep: Reputation: 31
What about if I had different situation? I want to understand the way to chmod only directories
Old 10-14-2003, 05:28 AM   #4
Registered: Apr 2003
Location: Netherlands
Distribution: SuSE (before: Gentoo, Slackware)
Posts: 613

Rep: Reputation: 30
find . -type d -exec chmod +x {} \;
, or "find . type d | xargs chmod +d" if I'm not mistaken.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
CC flags and the like Garp Linux - Software 2 05-17-2004 03:48 AM
rpmbuild flags vejnovic Linux - Software 0 05-03-2004 07:22 AM
some route flags Cubiq Linux - Networking 5 08-16-2002 11:37 AM
TCP-Flags?? X11 Linux - Networking 1 04-09-2002 02:41 AM
problem accessing directoires on cdrom u998r3s Linux - General 4 03-12-2002 12:17 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:16 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration