Created
September 16, 2020 23:27
-
-
Save rainabba/5963e54f86599c63f3964149458b216f to your computer and use it in GitHub Desktop.
cp - 'are the same file'
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Below is a script/log (anonymized) of an instance where I'm getting "are the same file" errors from `cp` | |
## Clearly they are not "the same file", but have identical contents and the 2nd is from a `git clone` command | |
#!/bin/bash | |
# me@myhost:/mnt/c/prj/someorg/some-project$ ls -lah; | |
ls -lah; | |
# total 0 | |
# drwxr-xr-x 1 someuser root 512 Sep 15 10:26 . | |
# drwxr-xr-x 1 someuser root 512 Jun 3 06:48 .. | |
# drwxr-xr-x 1 someuser root 512 Apr 16 10:46 .vscode | |
# drwxr-xr-x 1 someuser someuser 512 Sep 15 10:26 some-project | |
# drwxr-xr-x 1 someuser someuser 512 Sep 15 10:26 some-project_src | |
# me@myhost:/mnt/c/prj/someorg/some-project$ cp -ar ./some-project_src/* ./some-project/; | |
cp -ar ./some-project_src/* ./some-project/; | |
# cp: './some-project_src/CHANGELOG.md' and './some-project/CHANGELOG.md' are the same file | |
# cp: './some-project_src/README.md' and './some-project/README.md' are the same file | |
# cp: './some-project_src/cicd-aws-policy.json' and './some-project/cicd-aws-policy.json' are the same file | |
# cp: './some-project_src/package.json' and './some-project/package.json' are the same file | |
# cp: './some-project_src/scripts' and './some-project/scripts' are the same file | |
# cp: './some-project_src/src' and './some-project/src' are the same file | |
# cp: './some-project_src/template-sample.yaml' and './some-project/template-sample.yaml' are the same file | |
# cp: './some-project_src/test' and './some-project/test' are the same file | |
# me@myhost:/mnt/c/prj/someorg/some-project$ ls -lah ./some-project_src/CHANGELOG.md; | |
ls -lah ./some-project_src/CHANGELOG.md; | |
# -rw-r--r-- 1 someuser someuser 357 Sep 15 10:26 ./some-project_src/CHANGELOG.md | |
# me@myhost:/mnt/c/prj/someorg/some-project$ ls -lah ./some-project/CHANGELOG.md; | |
ls -lah ./some-project/CHANGELOG.md; | |
# -rw-r--r-- 1 someuser someuser 357 Sep 15 10:26 ./some-project/CHANGELOG.md | |
# me@myhost:/mnt/c/prj/someorg/some-project$ md5sum ./some-project_src/CHANGELOG.md; | |
md5sum ./some-project_src/CHANGELOG.md; | |
# 3d6f4c07fdae7b89d51ad0c9f7232459 ./some-project_src/CHANGELOG.md | |
# me@myhost:/mnt/c/prj/someorg/some-project$ md5sum ./some-project/CHANGELOG.md; | |
md5sum ./some-project/CHANGELOG.md; | |
# 3d6f4c07fdae7b89d51ad0c9f7232459 ./some-project/CHANGELOG.md |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment