chmod problem
Alf-Ivar Holm
alfh at student.matnat.uio.no
Mon May 9 17:10:33 UTC 2005
Matthew S-H <hellzfury at gmail.com> writes:
> I was changing the permissions of everything in a directory inside
> my home folder recursively, and I meant to type "chmod 777 .a*", but
> I accidentally typed "chmod 777 .*". [...]
> Now everything in my home folder with a starting letter before "L"
> (i guess it was doing it in alphabetic order) [...]
As the ".*" is expanded by the shell, you can get the list of files
given to chmod by issuing "echo .*" in the same directory. Your
assumption about sorting is right (at least if you were using
bash(1)). More info here:
http://www.tldp.org/LDP/Bash-Beginners-Guide/html/sect_03_04.html#sect_03_04_08
> Note that my last backup was a LONG time ago. I'd rather deal with
> unrestricted permissions than with losing all of my recent work.
Your backup may still provide you with the permissions of the files
that existed earlier. With a little bit of shell programming you
might restore most of the file permissions to their "before disaster"
state.
Affi
More information about the ubuntu-users
mailing list