I need of a script...

Discussion in 'Web Design & Coding' started by penguin, Jan 8, 2004.

  1. penguin

    penguin g0t r00t?

    Messages:
    101
    I have to add and change permissions on about 100 directories on a linux box. I would like to create a script to do this for me. Any ideas?
     
  2. cpugeniusmv

    cpugeniusmv Computer Genius

    Messages:
    485
  3. Zedric

    Zedric NTFS Guru Folding Team

    Messages:
    4,006
    Location:
    Sweden
    man chmod
     
  4. X-Istence

    X-Istence * Political User

    Messages:
    6,498
    Location:
    USA
    chmod -R <permmask> dir
     
  5. Geffy

    Geffy Moderator Folding Team

    Messages:
    7,805
    Location:
    United Kingdom
    the powers of that -R
     
  6. j79zlr

    j79zlr Glaanies script monkey Political User

    Messages:
    2,725
    Location:
    Chicago
    what are the names of the directories? If they are all foo-somethingelse then you can chmod 777 f00* and it will chmod all directories named foo-somehting or whatever your permissions are. The recursive -R switch changes the top level and all sublevel directories, so I guess it depends what you are actually trying to do.