Beginner Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOtherBeginner Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old May 29th, 2001, 11:42 AM
fantom fantom is offline
Up To No Good!
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 69 fantom User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 26 m 20 sec
Reputation Power: 8
How do I do this in telnet?

How would I CHMOD all files in a certain directory and all its subdirectories to 666, and all the folders to 777 without going thru each subfolder and CHMODing every file in telnet?

Reply With Quote
  #2  
Old May 29th, 2001, 12:33 PM
Atrus's Avatar
Atrus Atrus is offline
yet another member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2001
Posts: 262 Atrus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Hi!

You would need a condition....

test -d <filename>
returns true if <filename> is a directory.
Make a little script that checks with test whether something is a dir and in the else expression place your commands for handling other types of files (i.e. non-directories).

See man test there are more parameters to it if you want do distinguish links, too, and other things..

Greetings,

Atrus.


P.S.: A shellscript condition looks something like:

if test -d ... ; then
chmod ...
else
chmod ...
fi

Reply With Quote
Reply

Viewing: Dev Shed ForumsOtherBeginner Programming > How do I do this in telnet?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway