Folder location interrupted

Have had hidden/interrupted folder.
It is on a NTFS-partition I use for OS and Bootcamp.
I think that the problem is a HFS+ problem.
I happened with all the folder which had a slash "/" in their folder name.
So for example I had the folder "test/rand".
Recently it disappeared from finder. In windows I can see the folder as "test:rand",
but it doesn't allow me to open/rename it. It gives the error that the folder location can not be located.

I can see it only within terminal using

ls

and has the name "test:rand" But i can't access the folder via mv or cp. It gives me a 'no such file or directory'

If i write the folders name half way and let it extend using 'tab', it gives me "test\:rand". using then the command mv shows following:

mv /Users/george/test\:rand /Users/george
mv: rename /Users/george/test:rand: No such file or directory

So, what It does, It finds the folder and extends it to "test\:rand" but then it says that it doesn't exist but without backslash: "test:rand"

if i try mv using "test:rand"
it gives me the same error of not finding such file or directory

how can i access to this folder? it exists, but not, seems

Neither DOS, Windows, UNIX, or OSX allow you to have / inside file or folder names, how was this strange folder created?

Well OS X allows you to do so.
I just created two folders with a "/" in the name:
1) on the Mac Os Extended Format partition
2) on the NTFS shared partition
Both work fine on OSX.
(The same way I created the strange folder which is missing now.)
Booting from windwos via bootacmp:
1) Is invisible
2) Changed the "/" with a weird symbol, similar to this: ( DOT ABOVE), but the folder works.

Similar to my missing folder on OSX. I can see it on windows with a ":" instead of the "/" but it is not useable, because the folder information is missing. So I can see it in the terminal, but can't access to it. I guess OSX 10.9 has something to do with this...

That is very, very, very weird... Folders with / in them are prohibited by UNIX and OSX is supposed to be a UNIX -- I can only guess they did this for compatibility with some of Apple's really ancient filesystems where that was valid.

But it is not valid to put / inside NTFS. You really shouldn't do that.

Maybe a disk scan it renamed it to some untypable characters which might be accessible like this:

find . -type d -path '*/test*rand'

If that prints the folder name and only the folder name, try this:

find . -type d -path '*/test*rand' -exec mv '{}' 'validname' ';'

i know now i should not do that :smiley:
but OSX allowed it to me..so i had no doubts that moment...
the problem is, that i have about 10 folders like this now...

if i use find with . it finds a lot of directories...also from the operating system folders...
so i tried to search in area I know the folder lies:

find /Volumes/moby/Files/Other -type d -path �*/test*rand�
find: /Volumes/moby/Files/Other/test:rand: No such file or directory

it finds nothing, but it knows the folder test:rand

find /Volumes/moby/Files/Other -type d -path �*/test*rand� -exec mv '{}' 'test1� ';'

this gives me a

>
>
>

and terminal stops kind of

Editing your code in Microsoft Word has changed all your ordinary ' quotes into nasty smart quotes:

find /Volumes/moby/Files/Other -type d -path �*/test*rand�

But there may be a better way anyway.

$ ls -i
1871990 list  1871991 output

$ find . -inum 1871990 -exec mv '{}' 'newname' ';'

$ ls
newname output

$

Those numbers are inodes. find can identify a file or folder based on that and feed its name into mv hopefully including any untypable characters ended up in it.

And remember, use single quotes ' , not smart-quotes from MS Word.

how do i find out the inode for my folders?

i think i have got a problem now,
after trying to fix the folders, i restarted in windows (to see if someting happend there) and it did some harddisk check at startup and deleted the entries of the folders with untypable characters(i think)...
in windows then they disappeared even as not locatable folders.
same at OSX, I don't find them anymore via terminal....

Like I showed: ls -i

It must have (correctly) decided they were invalid folders and removed them. It may have put them somewhere like c:\found.000

Yes. OS X GUI allows / in file names, but OS X unix cleverly replaces / with : which is allowed in unix. There's a sort of understanding between the GUI and the gooey unixie goodness.

You will see the folder in the GUI with the slash in its name, but the CLI will see a colon.
Unfortunately, files cannot have a colon in their names in Windows.

Your move command didn't work because you attempted to move the folder to the exact same location without renaming it.
mv /pathtofolder/with\:colon /pathtofolder/without\ colon

would have worked. That renamed folder would then show up in the OS X GUI, CLI, and Windows. (unless some "hidden" attribute was in effect)

1 Like