• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

mkdir in java for Unix

 
Ranch Hand
Posts: 285
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
author
Posts: 3252
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
     
    reply
      Bookmark Topic Watch Topic
    • New Topic