Find the answer to your Linux question:
Results 1 to 2 of 2
Hi I ran this command in my home directory: chmod aniskop:aniskop .* -R Please DON'T run it as root! It looks like it changes the ownership off all files under ...
  1. #1
    Just Joined!
    Join Date
    Oct 2007
    Posts
    1

    chmod aniskop:aniskop .* -R effect

    Hi

    I ran this command in my home directory:

    chmod aniskop:aniskop .* -R

    Please DON'T run it as root!

    It looks like it changes the ownership off all files under $HOME and because ".." is the file it jumps one level up and because it have "-R" it changes everything. Could someone exlain why it's like that?

    Maybe it's Linux feature ??

    My other question is:how to change ownership off all files that start with .(dot)?

    Thanks for help
    P

  2. #2
    Linux Newbie hughitt1's Avatar
    Join Date
    Oct 2005
    Location
    Baltimore, MD USA
    Posts
    167
    To change ownership, don't you normally use "chown" and not "chmod?" Also, perhaps you could use a regular expression to change the permission for all files and folders starting with a period, e.g.

    Code:
    chown aniskop:aniskop .[a-z]*
    should change all of the files and folder that have a period followed by a letter and then any combination of characters.

    Hope this helps!
    Keith
    Open.nfo

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...