I am trying to create a directory for a movie on my Plex media server and ran into a strange issue. When I try to make a directory with the movie name ("Borat: Cultural Learnings of America for Make Benefit Glorious Nation of Kazakhstan"), I get the following error:
pi@raspberrypi:/media/pi/Plex/Movies $ mkdir "Borat: Cultural Learnings of America for Make Benefit Glorious Nation of Kazakhstan"
mkdir: cannot create directory ‘Borat: Cultural Learnings of America for Make Benefit Glorious Nation of Kazakhstan’: Invalid argument
I know that colon (:
) is a special character, and this command works without the colon. What I cannot explain is why the command works with the colon if I run it in different paths. For example, it worked in:
/media/pi
/home/pi
/tmp
I thought it might be because of a path length limit, but that was not the case. Any other ideas why this is happening?
/media/pi/Plex/Movies
directory mounted on?:
marks NTFS alternate data streams, hence isn't valid in file names there, so it's conceivable it would fail on NTFS./media/pi/plex
is external storage, using exFAT... I assume exFAT is like NTFS when it comes to colons.mkdir 'a:b'
and it happily creates the directory for me. (In Windows Explorer, however, the same directory is represented asa·b
.)