Questions & Answers

What is ' in directory and why is it pointing at root folder?

I have a folder:


The folder has ' in it's content: drwxrwxr-x 4Gb '

It seems it was created by accident

If I try to follow this directory till the end, it gets this:

cd /export/data/user/app1/conf/\'/export/data/user/app2/

I want to delete ' folder but I am not sure if rm -r is safe. Won't this delete app2 folder as well?

How this thing even called?

2023-01-24 23:52:11
' is a perfectly acceptable (albeit unusual and cumbersome) name for a directory in a unix-like. It should be safe to delete if quoted correctly (hint: in most interactive shells the autocompletion will use the correct format to quote it). I don't quite understand what you mean by "pointing at root folder"? Where did it come from? My guess is that some config file had the path start with that character, when it shouldn't have.
2023-01-24 23:52:11
@JoachimSauer I mean that while using autocompletion (tab basically) after ../app1/conf/\' it autofills with root folder first: /export. and if keep using autofill it will eventually end at /export/data/user/app2/ So it seems that it's behaviour is for some reason symlink-like
2023-01-24 23:52:11
Are you sure that there isn't simply a directory called export inside of that directory? What does ls -ld /export/data/user/app1/conf/\' and ls -l /export/data/user/app1/conf/\' print?
2023-01-24 23:52:11
@JoachimSauer ah I see your point... you are completely right, this is part of directory. Seems it was copied from 'original' /export/data/user/app2 at some point and this is why it was so confusing. Thank you
Answers(0) :