Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[gelöst] Rechte nach Typ rekursiv ändern
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
uhai
Veteran
Veteran


Joined: 23 Aug 2007
Posts: 1358
Location: Eppingen, Germany

PostPosted: Sun Jun 14, 2009 10:45 am    Post subject: [gelöst] Rechte nach Typ rekursiv ändern Reply with quote

Ich will in einem Verzeichnis die Rechte der Unterverzeichnisse rekursiv ändern, bin aber in der shell nicht so sicher...

das habe ich im Internet gefunden:

Code:
find . -type d -exec chmod 755 {} \;


Wie füge ich das Verzeichnis ein, für dessen Unterverzeichnisse ich die Rechte ändern will? Kann mir je,and die Syntax bitte kurz erklären oder eine ausführlichere Anleitung im Internet zeigen?

uhai


Last edited by uhai on Sun Jun 14, 2009 1:18 pm; edited 1 time in total
Back to top
View user's profile Send private message
musv
Advocate
Advocate


Joined: 01 Dec 2002
Posts: 3337
Location: de

PostPosted: Sun Jun 14, 2009 10:59 am    Post subject: Re: Rechte nach Typ rekursiv ändern Reply with quote

Wie füge ich das Verzeichnis ein, für dessen Unterverzeichnisse ich die Rechte ändern will?[/quote]
Code:
find /Pfad/zum/Hauptverzeichnis/* -type d -exec chmod 755 {} \;

Mit * gibst du dann, dass du nur den Inhalt des Verzeichnis betrachten willst, das Verzeichnis selbst bei der Suche außen vorläßt.
Back to top
View user's profile Send private message
uhai
Veteran
Veteran


Joined: 23 Aug 2007
Posts: 1358
Location: Eppingen, Germany

PostPosted: Sun Jun 14, 2009 1:19 pm    Post subject: Reply with quote

Danke schön, damit konnte ich ein altes Problem hier beseitigen...

uhai
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6747

PostPosted: Sun Jun 14, 2009 1:26 pm    Post subject: Re: Rechte nach Typ rekursiv ändern Reply with quote

musv wrote:
Code:
find /Pfad/zum/Hauptverzeichnis/* -type d -exec chmod 755 {} \;

Arrgl! Man benutzt doch kein *, wenn man nicht genau weiß, was man tut!
Zur ursprünglichen Frage: Ja, der erste Punkt ist in dem Beispiel der Directoryname; "man find" verrät Dir mehr (übrigens wäre ein "+" statt ein ";" als letztes Zeichen effizienter).
Vielleicht brauchst Du das aber gar nicht: Die meisten Leute, die so etwas fragen, suchen in Wirklichkeit "chmod -R +X directory" ("man chmod" erklärt, was das bedeutet).
Back to top
View user's profile Send private message
Necoro
Veteran
Veteran


Joined: 18 Dec 2005
Posts: 1912
Location: Germany

PostPosted: Sun Jun 14, 2009 3:15 pm    Post subject: Re: Rechte nach Typ rekursiv ändern Reply with quote

mv wrote:
Vielleicht brauchst Du das aber gar nicht: Die meisten Leute, die so etwas fragen, suchen in Wirklichkeit "chmod -R +X directory" ("man chmod" erklärt, was das bedeutet).

*diesen chmod in sein repertoire aufnehm*
_________________
Inter Deum Et Diabolum Semper Musica Est.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum