coreutils
coreutils copied to clipboard
mv removing data
rust mv is removing data and directory structure (ignoring the bad practice demonstrated here) gnu mv
mkdir mv-test
cd mv-test
mkdir mv-test-sub
touch test.txt mv-test-sub/test2.txt
cd mv-test-sub
mv ../* .
/usr/bin/mv: cannot move '../mv-test' to a subdirectory of itself, './mv-test'
ls
test2.txt test.txt
#results in warning, but all files exist as expected - i.e. moved into current subdirectory.
rust mv Running the above results in the mv-test-sub directory and the test2.txt inside being removed
Tested with 0.0.14, the latest git, and 0.0.12 on SLES 15SP3 and (latest git only) on Ubuntu 22.04 systems. manually built using make method: PROFILE=release make PREFIX=location install