Search code examples
excelunixpowerpointmacos-sierra

MacOS: remove temporary Microsoft files


My situation is as follows:

$ pwd /Users/user_name/Desktop

$ ls ~$file_1.xlsx ~$file_2.pptx ~$file_3.pptx

$ rm ~$file_1.xlsx rm: ~.xlsx: No such file or directory

Best I can gather, these files were opened during a VPN connection, and the connection was closed before the file was.

Each has permissions -rw-r--r--@

None are visible.

rm -rf also doesn't work.

Any way to get rid of these?


Solution

  • Try finding the inode number of those files using ls -il

    Then run the following command:

    find . -inum <i node number of the file here> | xargs rm -rf