1. Unix stat()/lstat() for Java stackoverflow.comSuppose I want to get several of a file's properties (owner, size, permissions, times) as returned by the lstat() system call. One way to do this in Java is to ... |
2. Pipe file disappears but still works stackoverflow.comI have 2 programs, both written in Java. The first launches several instances of the second and then communicates with them via pipe files. When running 2 instances of the program, ... |
3. Touch a file using apache FileUtils stackoverflow.comI have looked at the source code of Apache Commons FileUtils.java class to see how they implement unix like touch functionality. But I wanted to confirm with the community here if ... |
4. Solaris: Mounting a file system on an application's handlers stackoverflow.comWhen mounting an NFS filesystem, all data handling goes through the nfs client. How can I write my own handlers to use something other than NFS? An alternative would be a localhost ... |
5. How to "tail -f" file from a remote Unix system in Java? stackoverflow.comI want to be able to get buffered input from a remote system (using SSH and username password encrytion from Java) and then "tail -f" a file, buffering the input. Is ... |
6. Need File.isAbsolute() for platform independent application working with UNIX file system stackoverflow.commy Java application can run on all platforms. It is working with some remote files located on FTP server on Linux. To navigate on the FTP I use absolute paths like ... |
7. Java library to create cabinet files on Unix? stackoverflow.comIs there a Java library to create cabinet files on Unix. I don't need any compression support. I just want to create a plain cab file using Java. Something similar to ... |
8. How to get Unix file rights in Java stackoverflow.com
|
9. Java implementation of common unix file utilities like ls, cat, etc stackoverflow.comA similar question exists but the best answer seems to state there is no pure solution, but rather one needs to call the operating system. Why am i after such utilities, primarily ... |
10. Mounting of file systems remotely stackoverflow.com
|
11. Connect to Unix File System using Java Program stackoverflow.comI want to establish a connection with my UNIX file system using java program.. So that I can make some File I/O operations and normally I can connect using Putty. How can ... |
12. Need info on java.io.UnixFileSystem.rename0 stackoverflow.comCould you please explain the below stack trace, I tried to understand the source code but couldn't enough information on what
|
13. What is the difference between "./file" name and "../file name" stackoverflow.comactually I want to know What is the difference between "./file" name and "../file name" ? |
14. Mounting a drive in unix through Java coderanch.com |
15. Unix I/O Sync coderanch.com |
16. Is there an interface to UNIX stat() available? coderanch.com |
17. How to call a UNIX script froma java application on AIX (using Korn shell)? coderanch.comPhilip, Thanks a lot for the tip. Here's what I tried (almost similar to your tip) and it worked. import java.io.*; public class ExecScript { public static String Script; public static String Usage="java ExecScript script.name.path [arg0 arg1 ... argn]"; /** This method diplays the contents of the InputStream class passed to it as an argument. */ public static void displayOutput(InputStream is) ... |
18. getting unix like file information the java way coderanch.comWhat I basically want, is to find out wheter the owner, group and others have read, write and exec permissions on a file as well as the owner/group of that file (or directory). So far I do not know if there is any way to do so in Java, so if there isnt, is there a way then to get the ... |
19. File Creation Problem in unix coderanch.comin my code i am trying to write a file to the directory /home/bdb/store/ and i am creating a File f = new File("/home/dbd/store/"+filename); and giving it Outputstream .. but when i say private static String STOREDIR ="/home/bdb/store/"; File f = new File(STOREDIR,filename); i getting FileNotFoundException please can somebody show me the right way to give file paths in unix so ... |
20. How to get the file reciving time from unix box coderanch.comI'm not exactly sure what you're asking, but you should be able to get the file's timestamp by calling the lastModified() method on the java.io.File object. So, like this: import java.io.File; ... File f = new File("somepath/somefile.txt"); if (f.exists()) { long timestamp = f.lastModified(); // do whatever with that long, like create a java.util.Date and go // from there... } |
21. uncompressing .Z file in Unix coderanch.comI have written a program to uncompress a ".Z" file on Solaris. When I run it I get the following error: java.io.IOException: Not in GZIP format at java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:129) at java.util.zip.GZIPInputStream. |
22. Tailing a file on Unix coderanch.comI posted this before in a different group but got no reply so figured it may be harder than I thought. My system has a series of log files and what I want is to write a piece of java to tail the last 1000 lines which will then print onto the screen from the BufferedInputStream. I've got it working from ... |
23. File.getName() in Unix coderanch.comhi all, Has anyone encountered any issue with getName() function of File class in UNIX environment ? In windows platform getName() returns the name of the file ("filename.txt"), but the same is returning me the entire path in unix ("c:\folder\filename.txt"). Please let me know if there is any direct approach to resolve this issue ? I'm planning to find the last ... |
24. Decompress Unix compressed .z file coderanch.com |
25. Creating folers anf files in Unix using java coderanch.comUnix allows just about anything in file / folder names, including spaces and even other characters usually used by the shell. I even managed to create files that start with a -; it's a real trick trying to delete those I tell you, since rm thinks it's a flag for it. The trick is, on the shell you need to either ... |
26. Using java to chmod files in Unix coderanch.com |
27. Java not recognizing UNIX secondary group coderanch.comI'm seeing the following problem and I think it is related to java bug http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4052517 I have a directory called test. the ownership of that directory belongs to the 'aa' group. I have a user junioradm whose primary group is 'adm' but is also a member of the 'aa' group. I'm executing a java program as the junioradm user. The program ... |
28. Java Program for unix slect ()/poll() coderanch.com |
29. get file name using java on unix platform coderanch.com |
30. File IO on unix forums.oracle.com |
31. Unix File Permissions forums.oracle.comtry { String command = "chmod 604 " + file.getAbsolutePath(); Runtime.getRuntime().exec(command); } catch (IOException ioe) { ioe.printStackTrace(); } } This seems to work ok. However, as well as changing the file permissions, the code also seems to be unintentionally changing the permissions on the working directory ('bin') to 604, rendering it unusable. Not good. Has anyone come across a similar problem? ... |
32. File.exists() and accent on unix forums.oracle.com |
33. Unix and File IO forums.oracle.com |
34. How to open/read file using Java in Unix? forums.oracle.com |
35. Unable to locate existing file from unix using java program forums.oracle.com |
36. how to get all (user-group-others) file permission of a unix file forums.oracle.comIt is not clear to me what you are asking? If I understand you correctly, you want to tighten the restrictions on use of a directory beyond those provided by Unix. As far as I am aware, you cannot get information about the owner id or the group and world permissions from the File class so you are going to have ... |