OS: Oracle Enterprise Linux 5.4
It is not the first time I used the
mv command in Unix systems, but recently noticed some strange outcome in Linux.
That's why I though I would do some test, and now I wonder about the result. Is there something new or strange about the
mv command in Enterprise Linux?
Test 1:
mv renamed the file to * *.txt*. Does this mean wildcard operations are not possible anymore?
Test 2: Instead of overwriting the
test directory, it moved
test_test directory inside the existing
test. Is this correct?
# unalias mv
# mkdir test; cd test
# mkdir test test_test
# touch test.lst
# ll
total 8
drwxr-xr-x 2 root root 4096 Sep 21 00:50 test
-rw-r--r-- 1 root root 0 Sep 21 00:50 test.lst
drwxr-xr-x 2 root root 4096 Sep 21 00:50 test_test
TEST 1:
# mv test.lst *.txt
# ll
total 8
drwxr-xr-x 2 root root 4096 Sep 21 00:50 test
drwxr-xr-x 2 root root 4096 Sep 21 00:50 test_test
-rw-r--r-- 1 root root 0 Sep 21 00:50 *.txt
TEST 2:
# mv test_test test
# ll
total 4
drwxr-xr-x 3 root root 4096 Sep 21 00:52 test
-rw-r--r-- 1 root root 0 Sep 21 00:50 *.txt
# ll test
total 4
drwxr-xr-x 2 root root 4096 Sep 21 00:50 test_test
Thanks,
Markus