This probably is the wrong forum, but I'll give it a go anyway. I'm running the ubuntu subsystem in Windows 10 Enterprise:
root@hostname:/directory/stuff# cat /etc/*release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.3 LTS"
The file is in a repo and shows up with ls
and git status
, but not in the GUI ("Hidden Files" is checked in explorer view options) or with dir
in cmd. It's a "hidden" file that shows up when you open an Excel spreadsheet - only the spreadsheet is closed. Even if I open and close again, it's not removable. I can modify ownership and permissions with chmod
and chown
, which is weird that I can't do anything else:
root@hostname:/directory/stuff# ll
total 14600
...
-rwxrwxrwx 0 my_name my_name 165 Feb 14 13:25 '~$Copy of Full Compilation of Databases for Audit.xlsx'*
root@hostname:/directory/stuff# chown root: ~\$Copy\ of\ Full\ Compilation\ of\ Databases\ for\ Audit.xlsx
root@hostname:/directory/stuff# ll
total 14600
...
-rwxrwxrwx 0 root root 165 Feb 14 13:25 '~$Copy of Full Compilation of Databases for Audit.xlsx'*
I've tried:
root@hostname:/directory/stuff# ls -i
...
1688849860795414 '~$Copy of Full Compilation of Databases for Audit.xlsx'
....
root@hostname:/directory/stuff# find . -inum 1688849860795414 -exec rm {} \;
rm: cannot remove './~$Copy of Full Compilation of Databases for Audit.xlsx': No such file or directory
....
root@hostname:/directory/stuff# rm -i -- ./*
...
rm: remove regular file './~$Copy of Full Compilation of Databases for Audit.xlsx'? y
rm: cannot remove './~$Copy of Full Compilation of Databases for Audit.xlsx': No such file or directory
....
root@hostname:/directory/stuff# ls -1b
...
~$Copy\ of\ Full\ Compilation\ of\ Databases\ for\ Audit.xlsx
root@hostname:/directory/stuff# rm ~$Copy\ of\ Full\ Compilation\ of\ Databases\ for\ Audit.xlsx
rm: cannot remove '~ of Full Compilation of Databases for Audit.xlsx': No such file or directory
....
root@hostname:/directory/stuff# mv ~\$Copy\ of\ Full\ Compilation\ of\ Databases\ for\ Audit.xlsx just_a_file.xlsx
mv: cannot move '~$Copy of Full Compilation of Databases for Audit.xlsx' to 'just_a_file.xlsx': No such file or directory
Anything that anyone can add to this would be great!!
Correction:
Above, I said I couldn't see the file from CMD with dir
, but I can with dir /a
-- so windows sees it on some level. However, I still can't remove it, even from CMD (What's weird is that it does tab-complete here).
C:\Users\me\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu20.04onWindows_79rhkp1fndgsc\LocalState\rootfs\directory\stuff>dir /a
Volume in drive C has no label.
...
2022-02-14 13:25 165 ~$Copy of Full Compilation of Databases for Audit.xlsx
...
C:\Users\me\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu20.04onWindows_79rhkp1fndgsc\LocalState\rootfs\directory\stuff>del "~$Copy of Full Compilation of Databases for Audit.xlsx"
Could Not Find C:\Users\me\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu20.04onWindows_79rhkp1fndgsc\LocalState\rootfs\directory\stuff\~$Copy of Full Compilation of Databases for Audit.xlsx
root@hostname:/directory/stuff# rm "~\$Copy\ of\ Full\ Compilation\ of\ Databases\ for\ Audit.xlsx" rm: cannot remove '~$Copy\ of\ Full\ Compilation\ of\ Databases\ for\ Audit.xlsx': No such file or directory
git add
the file (had to, really) and push. However, when I pull to another remote repo, that file is not there. When I add another arbitrary file to the other remote repo, commit, then push > then pull on this remote repo, the file remains. github also does not show the file.rm -i *.xlsx
. Readman rm
.