[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Please exclude ".." and "." in path completion of ".*"
From: |
Manuel Reimer |
Subject: |
Please exclude ".." and "." in path completion of ".*" |
Date: |
Sat, 02 Jun 2007 22:49:44 +0200 |
Hello,
yesterday, I tried to just change the owner of a user profile. So I used "cd"
to get directly into the user directory and used this command, at first:
chmod -R $USERNAME *
Unfortunately there have been "dot files" in the user profile and so I tried
this command to catch them:
chmod -R $USERNAME .*
I didn't know, that this command also catches ".." and so chmod started to
chmod all user profiles... and so some users couldn't access their files for
several hours...
Of course, I could have used something like
chmod -R $USERNAME /home/$USERPROFILE
but shouldn't it be possible to "just catch all files and directories in the
current directory" using pattern matching?
Another example: How would I kill all files on a mounted removable media?
I would try to cd into the mountpoint and use the command
rm -rf * .*
If this also catches the "..", this would kill all files on my mounted drives
in /mnt.
I think it would be a pretty good idea to modify bash to not catch ".." and "."
if someone wants to match ".*". Noone really wants ".." or "." to be matched in
this case, and for those, who want this, it would be possible to add a new
shopt option.
Thank you very much in advance for your answer. It would be great if someone
could create the needed patch, as I would need several days or weeks to create
it on my own. If you don't have the required time to fix this issue, then
please at least tell me if you would accept a patch for this issue. If you
would accept a patch, I'll start to create one to send it in.
Yours
Manuel Reimer
--
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kanns mit allen: http://www.gmx.net/de/go/multimessenger
- Please exclude ".." and "." in path completion of ".*",
Manuel Reimer <=