12
votes
2answers
471 views

Shell filename pattern that expands to dot files but not to `..`?

Recently I had a little mishap caused by a shell pattern that expanded in an unexpected way. I wanted to change the owner of a bunch of dot files in the /root directory, so I did chown -R root .* ...
5
votes
2answers
535 views

Copy all dotfiles except for `.git` and `..`

I am aware of using .[!.]* to refer to all dotfiles in a directory with the exception of .., but how might one refer to all dotfiles except for .. and .git? I have tried several variations on ...
3
votes
4answers
985 views

cp hidden files with glob patterns

Situation : $ mkdir foo && touch foo/.test $ cp foo/* . zsh: no matches found: test/* (or bash : cp: cannot stat ‘test/*’: No such file or directory) I have a directory full of hidden ...
1
vote
1answer
278 views

restricting pushes to selected Mercurial repositories using `ssh` forced commands and `hg-ssh`

The context of this question is the hg-ssh script. It is helpful but not critical to know something about Mercurial. This script sets up a forced command using public keys so the given public key ...
35
votes
6answers
34k views

How do you move all files (including hidden) in a directory to another?

How do I move all files in a directory (including the hidden ones) to another directory? For example, if I have a folder "Foo" with the files ".hidden" and "notHidden" inside, how do I move both ...
5
votes
4answers
204 views

is the behaviour of .* to include . and .. defined in LSB or POSIX or some other specification?

as title: is the behaviour of .* to include . and .. defined in LSB or POSIX or some other specification?