LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices


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

Rep: Reputation: 32
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
hw-tph
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.

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

Original Poster
Rep: Reputation: 32
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
yapp
Member
 
Registered: Apr 2003
Location: Netherlands
Distribution: SuSE (before: Gentoo, Slackware)
Posts: 613

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


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:36 PM.

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