• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

mkdir in java for Unix

 
Anthony Smith
Ranch Hand
Posts: 285
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I use the mkdir in my servlet to create a certain directory if it does not exists. Well here's my problemo. It works fine on Windows but craps out on Unix. I see the folder there I create but later on in my code I try and write a file to the folder and it bombs put saying that it does not exist, when I am looking at it. However if I try and go to the server and cd to the folder it says does not exists but it is there and I do a ls -l and it says that the folder is a folder. However if I try and do a mkdir with the same name it makes another dir with the same name in the same place. I do a ls -l and everything is identical except the date.
Please help!
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't believe you The folder names are not the same.
  • Unix is case sensitive, where Windows isn't. Do you have case differences?
  • Unix allows virtually any character to be part of a directory (or file) name, including spaces and many unprintable characters. Are you sure you don't have trailing spaces or embedded unprintables in one of them?
  • If necessary, use "ls -l|od -a" to generate a dump of the ls output that will show you all unprintables and spaces in the filenames.
  • Hope this helps,
    - Peter
    [ May 18, 2002: Message edited by: Peter den Haan ]
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic