Hi Ho!
$ pwd
/home/eus/shared/
$ ls
./
../
inside/
$ ls inside
./
../
.a/
.b/
x/
y/
If I want to move the whole content of /home/eus/shared/inside/ into /home/eus/shared/ including the hidden files, what command should I issue?
I cannot do the following ones:
$ mv -i -- inside/. ./ (ERROR: cannot overwrite ./.)
$ mv -i -- inside/* ./ (ERROR: the hidden files are left out)
Well, I can do:
$ cd inside
$ find -maxdepth 1 -mindepth 1 -exec mv -i -- '{}' ../ ';'
But, is there a better way?
Thank you.
Best regards,
Eus
.[^.]*
mv dir/* dir/.[^.]* .
but you will get a message if there is no match for one of the globs
Not better?
Hi Ho!
IMHO, it's not better than the `find ...' because it will leave out the hidden files in the following case:
$ ls inside
./
../
.a/
.b/
..c/
..d/
...e/
x/
y/
But, your method instills an idea:
Is there a way to say `mv -i -- inside/{everything except ./ and ../}'?
Thank you.
Best regards,
Eus
cd inside /bin/mv -f * .*
cd inside
/bin/mv -f * .* ..
(some complaints, but the work is done)