Widespread Augmented Reality

Widespread Augmented Reality
Click on the image to get the Android Augmented Reality Heads up Display

Sunday, April 24, 2022

Delete Linux File with Special Characters in the Name

I mistakenly created a file called "vscode.list'". Note that there is a single quote appended to the last character. This will create a problem when trying to execute rm vscode.list'.
This is the workaround as executed through the terminal command line.
root@mya55:/etc/apt/sources.list.d# ls
google-chrome.list vscode.list vs.code.list'
root@mya55:/etc/apt/sources.list.d# ls -li
total 8
3933142 -rwxr-xr-x 1 root root 190 Nov 11 14:26 google-chrome.list
3933031 -rw-r--r-- 1 root root 129 Apr 23 18:38 vscode.list
3933030 -rwxr-xr-x 1 root root 0 Apr 24 2022 vscode.list’
root@mya55:/etc/apt/sources.list.d# find . -inum 3933030 -exec rm -v {} \;
removed './vscode.list’'
root@mya55:/etc/apt/sources.list.d# ls
google-chrome.list vscode.list
root@mya55:/etc/apt/sources.list.d#

No comments:

Post a Comment