Linked Questions
13 questions linked to/from How can I delete a file which filename has non-printing characters
218
votes
8
answers
40k
views
Why is looping over find's output bad practice?
This question is inspired by
Why is using a shell loop to process text considered bad practice ?
I see these constructs
for file in `find . -type f -name ...`; do smth with ${file}; done
and
for ...
5
votes
7
answers
7k
views
Removing a file with non-printing characters [duplicate]
I've come across a file created accidentally, and having a really screwed up filename. The output of ls -lq:
ls -lq
total 2
-rw-r--r--. 1 mbyx7ag2 zk01 0 May 1 2014 ???E@X?p@8?@
I have made ...
3
votes
5
answers
550
views
move a directory with a single character (back quote) as its name [duplicate]
How can I move a directory whose name is just a space?
ls -lah
drwx------ 4 user1 user1 8.0K Mar 13 14:16 .
drwxr-xr-x 3 root root 60 Mar 13 13:48 ..
drwx------ 18 user1 user1 4.0K Mar 13 11:18 ...
12
votes
4
answers
12k
views
Files with empty names
I was writing a widget for displaying files in a given directory and I wondered whether I need to cover the case where a file has an empty name.
Testing showed not obvious results, so I was ...
12
votes
3
answers
6k
views
Is it possible to rename a file or directory using the inode?
I changed the /home directory to a different partition and couldn't access the files from it, something I have been able to solve from this question - How do you access the contents of a previous ...
7
votes
3
answers
4k
views
Delete files with names that appear to begin with '?' in command line
I am running under Debian stable, Cinnamon DE and I have some files that I would like to delete with a command line (for now I delete these files with Nemo).
For example, these .txt files begin with '...
0
votes
3
answers
227
views
How to remove poorly named file [duplicate]
I was using pscp to copy files from a Windows machine to a Linux machine. I accidentally got the path wrong and now there are files that I can't seem to remove. I think it is because of the slashes in ...
3
votes
2
answers
360
views
Delete file with broken name
I've somehow created a file that I can not seem to figure out how to delete via CLI.
$ ls -alF
total 8195
-rw-r--r--+ 1 me my_group 0 Jul 19 14:10 ''$'\r'
drwxrwx---+ 1 system ...
3
votes
2
answers
414
views
Delete folder with empty (?) file name
It looks like I have a folder containing a folder with empty file name.
$ ls -alF Antonin_Dvorak/
total 12
drwx------ 3 VUW\me VUW\domain users 4096 Jan 22 2015 /
drwx------ 3 VUW\me VUW\domain ...
1
vote
2
answers
895
views
Can't remove directory with weird name [duplicate]
While creating a new folder I didn't realise that in BASH ' is a special character, which means I ended up with a folder named
One Flew Over the Cuckoos\ Nest\ \(1975\)?quit?quit()?ls??????????
or ...
1
vote
2
answers
2k
views
How to remove failed file with backspace in its name? [duplicate]
Sorry if I am not using the right terms for naming these "backspace chars".
I would like to clean up a directory that contains two files which looks like they contain backspace in their name. If I ...
3
votes
1
answer
753
views
Unix - Delete folder with strange characters using inode or similar [duplicate]
I want to remove this folder :
Name Name 1x05 name Formación
I have tried all I have seen on internet :
find -maxdepth 1 -inum INODE_NUMBER -exec rm -i {} \;
rmdir: wrong deleting './Name Name ...
2
votes
1
answer
77
views
How to delete directory I can't spell? [duplicate]
I mistyped a directory name when building a project, and embarassingly, now I have a directory I cannot spell, so I can't run rm -rf ..<innomable>:
> cd buil
build-fix-memleak/ ...