Forums Register Login

to execute commands in linux through java

+Pie Number of slices to send: Send
hi
actually we have a project where we use Runtime class and its exec() method
to run dos commands on windows platform.but our requirements are now different .we now want either a dos command where we can open a file which contains a particular phrase or a keyword.

can we find such a dos COMMAND ?

OR

we can choose for linux platform.but the trouble is i dont know how to run commands in linux platform by using exec() method of Runtime class.

please help me soon.
+Pie Number of slices to send: Send
 

Originally posted by amit bathla:
hi
actually we have a project where we use Runtime class and its exec() method
to run dos commands on windows platform.but our requirements are now different .we now want either a dos command where we can open a file which contains a particular phrase or a keyword.

can we find such a dos COMMAND ?

OR

we can choose for linux platform.but the trouble is i dont know how to run commands in linux platform by using exec() method of Runtime class.

please help me soon.




RunLinux.java
+Pie Number of slices to send: Send
Are you looking for something like the 'find' command for DOS?
I'm pretty sure there is one, perhaps called 'find' too or 'search'.

At least there are the UnxUtils here: UnxUtils which include grep.



These are native windows ports of the GNU Utils and don't need a cygwin or some emulator.

On Linux it would be in the example above:
+Pie Number of slices to send: Send
 

Originally posted by Stefan Wagner:
Are you looking for something like the 'find' command for DOS?
I'm pretty sure there is one, perhaps called 'find' too or 'search'.

At least there are the UnxUtils here: UnxUtils which include grep.



These are native windows ports of the GNU Utils and don't need a cygwin or some emulator.

On Linux it would be in the example above:



There is a Unix find command and it bears about as much resemblance to the DOS find command as MS-Word does to Windows Notepad, funtionally speaking.
World domination requires a hollowed out volcano with good submarine access. Tiny ads are optional.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1198 times.
Similar Threads
HOW TO RUN COMMAND ON REMOTE PC
Executing Dos based command
run dos cammand in java code
run unix commands inside Java Servlet
Signed applet fork process>?
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 16:18:56.