Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

mv shouldn't delete directory before it's moved/copied entirely #7933

Copy link
Copy link
Open
@GZGavinZhao

Description

@GZGavinZhao
Issue body actions

This only applies when mv-ing directories across different filesystems.

According to this StackOverflow post, in particular user263131's command, if I run (coreutils) mv /mnt/fs1/foo /mnt/fs2/ and I interrupt before the command is completed, the contents of /mnt/fs1/foo should stay unchanged. However, this is not behavior of uutils mv. To repro,

mkdir test
dd if=/dev/zero of=test/a bs=1M count=100
dd if=/dev/zero of=test/b bs=1M count=100
dd if=/dev/zero of=test/c bs=1M count=100
dd if=/dev/zero of=test/d bs=1M count=100
mv -g test /mnt/fs1/

Watch the progress bar and Ctrl+C after one file is moved. You will see that test only contains 3 files now. However, the behavior of mv is that all 4 files remain. You can verify this by running (coreutils) mv -v test /mnt/fs1 and Ctrl+C after one file is copied. All files in test are preserved.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.