I need to write java code to be able to work in Unix environment for file operations. As I need to deal with files, how do I create and save a file in Unix format in Java?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
“Unix format” is simply a text file that denotes line endings with
\ninstead of\n\r(Windows) or\r(Mac before OSX).Here’s the basic idea; write each line, followed by an explicit
\n(rather than.newLine()which is platform-dependent):