Using the unix telnet command in java
I am using Runtime.getRuntime().exec("telnet ......") to excute the telnet command within my java program.
Basically, I'm writing a program to automate a bunch of processes, and one of them requires the process to be executed in another machine.
It keeps hanging and never gets to the login portion.
Am i going about this the right way? Can anyone suggest an alternative?
Paul
If you're using Telnet to execute a process in another machine, how about simply writing a socket client instead? Once the connection is made you will simply have to send the commands (user name, wait for response, password, wait for response, command...) that would normally be sent via Telnet.
A Telnet server is just waiting for anybody to connect to its port (usually 23); it doesn't matter whether it's an 'official' Telnet client or any other program, it's too dumb to tell!
Chris.
Similar Messages
-
How can I use the UNIX ls command to display sizes of folder contents?
Hello,
Say I run the command ls -lohS in terminal on my Home directory...
Mac-Pro:~ mike$ ls -lohS
total 0
drwx------+ 57 mike 1.9K Aug 31 16:52 Library
drwx------+ 32 mike 1.1K Sep 14 16:58 Desktop
drwx------+ 13 mike 442B Sep 9 18:25 Pictures
drwx------+ 12 mike 408B Sep 9 18:25 Documents
drwx------+ 8 mike 272B Sep 9 18:25 Downloads
drwx------+ 5 mike 170B Sep 9 18:25 Movies
drwx------+ 5 mike 170B Sep 9 18:25 Music
drwxr-xr-x+ 5 mike 170B Sep 9 18:25 Public
drwxr-xr-x+ 5 mike 170B Sep 9 18:25 Sites
drwxr-xr-x 2 mike 68B Dec 3 2010 Applications
I don't know what that size column shows for folders, but it's certainly not the size of the contents of the folder. How can I display this list, but with the sizes of the entire contents of each folder, including all of its subfolders?
Basically, I need the Terminal equivalent of opening my Home folder in Finder, Clicking Show View Options, clicking Calculate All Sizes, and then sorting the Size column descending.
Thanks for any help you can give!
-Mikedu
See man page for options.
For example:
du -hd1 ~
du -kd1 ~ -
Using the Oracle Repository Command Line Tool under Linux
I have to use the command lines of Linux for SCM commands(like repcmd,
set workarea, checkin etc...)
should I have to install something?
I have documentation for using the oracle repository command line Toll
for Windows and Unix, but I didn't found anything about using the oracle
repository command line Tool for Linux.JDeveloper runs excellent on Linux and is supposed to be able to use the repository, but that's a GUI...
-
Trying to Download a Software Image to Cisco 2800 series router through TFTP Using the tftpdnld ROMmon Command
and I am getting an Error , I cant figure out what I am doing wrong. I have also pasted my display down here can someone help me out, thanks in advance, I am still new to this utility.
My questions are How do you direct this utility to point to the desktop or the TFTP folder
does FE_PORT: Fast Ethernet 0 imply or point to Fa0/0 on my router
My router is suppose to have 10.0.0.3 255.0.0.0
Gateway of 10.0.0.1 255.0.0.0
My TFTP Server 10.0.0.2 255.0.0.0
How do I get the MAC address of the Router or the TFTP Server and which one is required?
my Ethernet port is 100Mb/Sec I cant tell whether it is full duplex or not so How do i set this FE_SPEED_MODE: Auto???
=====================================================================================
rommon 10 >
rommon 10 > set
PS1=rommon ! >
FE_PORT=0
WARM_REBOOT=
RET_2_RTS=20:35:55 UTC Thu Sep 25 2014
BSI=0
RET_2_RCALTS=
RANDOM_NUM=1600357627
?=0
IP_ADDRESS=10.0.0.3
IP_SUBNET_MASK=255.0.0.0
DEFAULT_GATEWAY=10.0.0.1
TFTP_SERVER=10.0.0.2
TFTP_FILE=
rommon 11 > TFTP_FILE=c2800nm-adventerprisek9-mz.124-24.T4
rommon 12 > TFTP_CHECKSUM=0
rommon 13 > SET
monitor: command "SET" not found
rommon 14 > set
PS1=rommon ! >
FE_PORT=0
WARM_REBOOT=
RET_2_RTS=20:35:55 UTC Thu Sep 25 2014
BSI=0
RET_2_RCALTS=
RANDOM_NUM=1600357627
IP_ADDRESS=10.0.0.3
IP_SUBNET_MASK=255.0.0.0
DEFAULT_GATEWAY=10.0.0.1
TFTP_SERVER=10.0.0.2
?=0
TFTP_FILE=c2800nm-adventerprisek9-mz.124-24.T4
TFTP_CHECKSUM=0
rommon 15 > tftpdnld
IP_ADDRESS: 10.0.0.3
IP_SUBNET_MASK: 255.0.0.0
DEFAULT_GATEWAY: 10.0.0.1
TFTP_SERVER: 10.0.0.2
TFTP_FILE: c2800nm-adventerprisek9-mz.124-24.T4
TFTP_VERBOSE: Progress
TFTP_RETRY_COUNT: 18
TFTP_TIMEOUT: 7200
TFTP_CHECKSUM: No
TFTP_MACADDR: 30:37:a6:49:35:a8
FE_PORT: Fast Ethernet 0
FE_SPEED_MODE: Auto
Invoke this command for disaster recovery only.
WARNING: all existing data in all partitions on flash: will be lost!
Do you wish to continue? y/n: [n]: y
ARP: address resolution for 10.0.0.2 timed out.
ARP failed with failure code 1. TFTP transfer aborted.
TFTP: Operation terminated prematurely.
rommon 16 > " not found
rommon 17 >FE_SPEED_MODE=2
variable name contains illegal (non-printable) characters
rommon
rommon 18 > set
PS1=rommon ! >
FE_PORT=0
WARM_REBOOT=
RET_2_RTS=20:35:55 UTC Thu Sep 25 2014
BSI=0
RET_2_RCALTS=
RANDOM_NUM=1600357627
IP_ADDRESS=10.0.0.3
IP_SUBNET_MASK=255.0.0.0
DEFAULT_GATEWAY=10.0.0.1
TFTP_SERVER=10.0.0.2
TFTP_FILE=c2800nm-adventerprisek9-mz.124-24.T4
TFTP_CHECKSUM=0
?=0
rommon 19 > tftpdnld [ur]
usage: tftpdnld [-hr]
Use this command for disaster recovery only to recover an image via TFTP.
Monitor variables are used to set up parameters for the transfer.
(Syntax: "VARIABLE_NAME=value" and use "set" to show current variables.)
"ctrl-c" or "break" stops the transfer before flash erase begins.
The following variables are REQUIRED to be set for tftpdnld:
IP_ADDRESS: The IP address for this unit
IP_SUBNET_MASK: The subnet mask for this unit
DEFAULT_GATEWAY: The default gateway for this unit
TFTP_SERVER: The IP address of the server to fetch from
TFTP_FILE: The filename to fetch
The following variables are OPTIONAL:
TFTP_VERBOSE: Print setting. 0=quiet, 1=progress(default), 2=verbose
TFTP_RETRY_COUNT: Retry count for ARP and TFTP (default=18)
TFTP_TIMEOUT: Overall timeout of operation in seconds (default=7200)
TFTP_CHECKSUM: Perform checksum test on image, 0=no, 1=yes (default=1)
TFTP_MACADDR: The MAC address for this unit
FE_PORT: 0= (default), 1
FE_SPEED_MODE: 0=10/hdx, 1=10/fdx, 2=100/hdx, 3=100/fdx,
5=Auto (default)
TFTP_DESTINATION: The flash destination device for the file
flash:(default), usbflash0:, usbflash1:
Command line options:
-h: this help screen
-r: do not write flash, load to DRAM only and launch image
rommon 20 > tftpdnld
IP_ADDRESS: 10.0.0.3
IP_SUBNET_MASK: 255.0.0.0
DEFAULT_GATEWAY: 10.0.0.1
TFTP_SERVER: 10.0.0.2
TFTP_FILE: c2800nm-adventerprisek9-mz.124-24.T4
TFTP_VERBOSE: Progress
TFTP_RETRY_COUNT: 18
TFTP_TIMEOUT: 7200
TFTP_CHECKSUM: No
TFTP_MACADDR: 30:37:a6:49:35:a8
FE_PORT: Fast Ethernet 0
FE_SPEED_MODE: Auto
Invoke this command for disaster recovery only.
WARNING: all existing data in all partitions on flash: will be lost!
Do you wish to continue? y/n: [n]: y
ARP: address resolution for 10.0.0.2 timed out.
ARP failed with failure code 1. TFTP transfer aborted.
TFTP: Operation terminated prematurely.
rommon 21 >What I notice in the original post is this error
ARP: address resolution for 10.0.0.2 timed out.
which says that the router is looking for the 10.0.0.2 server but not getting response to its arp request. Can the original poster clarify for us how the device that has the image file is connected to the router that has the problem? Also what kind of device is 10.0.0.2? Is it a PC running TFTP server software or is it something else?
HTH
Rick -
I sent iTues to trash by mistake (trying to delete files from "yesterday"). I got the program back but have to "put back" songs one at a time. Is there a way to put back multiple songs using the "select all" command or anything else? Thanks for the help.
The prgram is in one location and the library (media + library files) are in another. Sending it all to the trash would take some pretty delibrate multiple actions and digging through multiple folders, so I don't know how this was managed unless there's something in Snow Leopard that's new. Occasionally I have moved a file to the trash in Finder that I didn't want to and I can use Finder's "undo" to undo the last move. With many files...?
-
I can no longer use the keyboard shortcuts, 'command C' and 'command V'. Did I inadvertently do something to my keyboard or computer that caused this? Is there a way to fix it?
You can also check in System Preferences > Keyboard > Keyboard Shortcuts, make sure that custom shortcuts were not created using those same commands. If ones were, they could be creating a conflict. Step throuogh each of the items in the left list, checking the array presented in the right pane for each.
-
When I try to use the refine edge command I get this message could not complete the refine edge comm
when I try to use the refine edge command I get this message could not complete the refine edge command because of programe error
Quit the editor, then restart it while holding ctrl+alt+shift (command+option+shift on a mac). Keep the keys down till you see a window asking if you want to delete the settings file. You do.
-
Whenever I close down Photoshop CS5 I get the message: "Could not save Preferences because the file is locked or you do not have the necessary access privileges. Use the get info command in Finder to unlock the file or change permission on the file or enclosing folders." What on earth does it mean? How can I stop this message from appearing?
See here:
I cannot save recent images. -
I have this massage every time close ps cc
Could not save Preferences because the file is locked, you do not have necessary access permissions, or another program is using the file. Use the ‘Get Info’ command in the Finder to ensure the file is unlocked and you have permission to access the file. If the problem persists, save the document to a different file or duplicate it in the Finder.You may get better help in Photoshop General Discussion
The Cloud forum is not about using individual programs
The Cloud forum is about the Cloud as a delivery & install process
If you will start at the Forums Index https://forums.adobe.com/welcome
You will be able to select a forum for the specific Adobe product(s) you use
Click the "down arrow" symbol on the right (where it says All communities) to open the drop down list and scroll
If FINDER means Mac, read below (and try to give more information when asking a question)
Mac 10.9.3 workaround https://forums.adobe.com/thread/1489922
Enable Mac Root User https://forums.adobe.com/thread/1156604
-more Root User http://forums.adobe.com/thread/879931
-and more root user http://forums.adobe.com/thread/940869?tstart=0 -
Using the 'route print' Command in Windows 7 - Detailed Screen Captures
The 'route print' Command from an Administrative Command Prompt in Windows 7 provides a variety of useful information. Let's take a look at the output of a 'route print' Command to examine how the output data is grouped and to understand its logic.
Let's begin by simply issuing the following command:
route print
An Administrative Command Prompt output shows the following the following sections of the Command Output:
Figure 1 - Issuing the 'route print' Command from an Administrative Command Prompt in Windows 7
Observing the output of the Command indicates there are 5 Major Sections. The Sections include:
Interface List
IPv4 Route Table
IPv4 Persistent Routes
IPv6 Route Table
IPv6 Persistent Routes
On this Workstation a single Physical Network Interface is visible and has been assigned a DHCP Address of '10.1.1.36'.
The IP Stack for this Workstation is as follows:
IP Address: 10.1.1.36
Subnet Mask: 255.255.255.0
Default Gateway: 10.1.1.1
DNS Server: 10.1.1.1
DHCP Server: 10.1.1.1
DNS Suffix: YYY.YYY.isp-provider.net
Most of the time our focus is upon the IPv4 Routing Table output. Here are the sections of the IPv4 Routing Table output for reference.
Figure 2 - The IPv4 Route Table output listing the 'all networks' route through the Default Gateway.
The next IPv4 Routing Table entry indicates '10.1.1.36' (the Host Workstation' is a member of the '10.1.1.1/24' Network and would route packets out the '10.1.1.36' Interface.
Figure 3 - The Workstation Host at '10.1.1.36' is a member of the '10.1.1.0/24' Network Subnet.
The next IPv4 Routing Table entry indicates '10.1.1.36' may receive a Broadcast from the '10.1.1.0/24' Network (as noted by the Subnet Mask of '255.255.255.255').
Figure 4 - The Workstation Host at '10.1.1.36' can offer a Broadcast on the '10.1.1.0/24 Network' (as noted by the 255.255.255.255 Subnet Mask).
Another IPv4 Routing Table entry focused on Broadcast Addresses is the following. The Host Workstation at '10.1.1.36' may offer Network Broadcasts to the '10.1.1.0/24' Network.
Figure 5 - The Workstation Host at '10.1.1.36' can receive Network Broadcasts from the '10.1.1.0/24' Network (as noted by the '10.1.1.255' Network Destination).
The next IPv4 Routing Table entries (3 of them) are focused on the Loopback Network Values of '127.0.0.0/8', '127.0.0.1/32' and the Loopback Network Address of '127.255.255.255/32' respectively. These Addresses provide Services to the Local Host (or Loopback Adapter). The Loopback Network Destination of '127.0.0.0' provides access to the Loopback Network through '127.0.0.1' the Loopback IP Address. The Loopback IP Address of '127.0.0.1/32' receives Limited Local Broadcast to the Loopback Network while the Loopback IP Address of '127.255.255.255/32' provides Limited Broadcast to the Loopback Network.
Figure 6 - The Workstation Host at '10.1.1.36' uses 3 Addresses for Services to the 'Local Host'. All 3 Addresses incorporate the '127.x.x.x' format.
Next the Routing Table includes 2 specific entries for the Multicast Network (224.0.0.0/4) for both the 'Local Host' or Loopback Address of '127.0.0.1' and the Host IP Address of '10.1.1.36' that are '224.0.0.0/4' . These are used for Multicast Network functions.
Figure 7 - The Workstation Host at '10.1.1.36' includes 2 Multicast Addresses (starting with '240.0.0.0') reserved for use through either the Loopback Address '127.0.0.1' or the Host IP Address '10.1.1.36'.
The last 2 Routing Table entries provides Services through Limited Broadcast Addresses. The Network Destination of '255.255.255.255/32' are the Limited Broadcast Address Ranges for both the Loopback Adapter '127.0.0.1' and the Host IP Address '10.1.1.36'.
Figure 8 - The Workstation Host at '10.1.1.36' includes 2 Limited Broadcast IP Address Values to Service both the Loopback Network '127.0.0.1' and the Host IP Network '10.1.1.36'.
Finally, upon understanding the sections of the Windows 7 Routing Table there are additional functions available when using the 'route' Command. This Blog entry is focused solely on output from the 'route print' Command.
Summary: In this Blog entry focused on using the 'route print' Command from an Administrative Command Prompt in Windows 7. Each of the defined routes for a Workstation running Windows 7 Enterprise were reviewed for reference.
Lynn Lunik
Chief Security Architect
IT Pro Secure Corporation
and exchangesummit.net
blog <at> itprosecure.comI thought, it is my browser issues of not seeing the images.
but as seen on the other comments, this not in my browser case.
Can someone check on this and repost the images if needed? -
Help using the Connection Trunk command
Hello Group,
I could use a bit of assistance accomplishing the following.
I have two Cisco 1760 Routers with a WIC 1/DSU T1 and one VIC2/E/M in each router. I am new to CLI commands and could use some tips.
I would like to set up these routers (I will call them Router A and Router B) to communicate with each other via a internal IP network which spans between two seperate locations.
I would like to set up these routers to use the E&M ports to send and receive audio between locations. The E&M ports are connected to my external equipment which allows for transmit and receive audio to be delivered to the E&M port.
I need to be able to allow for the routers to use 2 wire or 4 wire audio between locations, which is matched at both ends. The routers do not dial phone numbers nor are phones in use at all. Basically the routers are going to be used to send and receive two way radio voice between the locations which the radios are interfaced to the E&M ports.
Can anyone please help me on configuring these routers to accomplish this and if I need to use the Connection Trunk command I can do so, as this is the only purpose of the routers is to relay audio between locations.
Please Help.
Thanks A bunch!!
RickThank you for taking the time to reply, However I have allready configured the routers to link the LMR sites together. I have been connecting LMR assets utilizing ROIP for many years using non-cisco equipment which is specifically designed for ROIP, I have a large inventory of 1760 routers which were originally used for Telco applications which were replaced by newer equipment. The fact that the routers have become "obsolete" does not mean that they are not usable for my application. How can you make a statement that this is "limited equipment" when the intended use of this equipment for my application has been accomplished without limitations which are specific to my operation.
I posted a request on this forum to obtain some help in the configuration of these devices from people who are familiar with the 1760 router. Your response was the first response which I had received in regards to my request for assistance, I thank you for at least attaching a link to some resources which I can utilize. Utilizing the services of a "reputable consultant" or "UC certified partner" would be acceptable in some circumstances, however utilizing the services which would be provided by such would only pose limitations on our technical skills. I do not want to have to rely on a third party consultants to acheive what is engineered and desgned in house by our staff.
I am not looking to purchase new equipment, nor am I looking for consulting help on this issue as we manage and deploy equipment in house. Enlisting the services of a consultant or certified partner for our Cisco equipment deployments would only add unnecessary costs and time to deploy equipment. Again thank you for the link to the examples.
Respectfully,
Richard Wiglesworth -
Is it possible to use the JS coding in webdynpro java application!!!
Hi Experts,
Is it possible to use the JS coding in webdynpro java application by any means?
If yes, kindly suggest the procedure or any pointers for the same.
Thanks in advance.
Regards,
AnuragHi,
I'm not an expert in this matter, but I will post here what I know:
In NW7 releases (at least 7.01.05) it is possible to run JS, also to capture any WD Event and run your own JS code after that, using IFRAME. I have jQuery running here, it would take some time till you create a "framework" to enable some easy usage. I just want to highlight that is possible, thou I think it's a lot of effort.
Not sure about CE7.1 it seems iFrame is deprecated. Still, being deprecated should not "block" the usage, thou it's not recommended since this functionality can be removed in next releases.
I've read that CE7.2 has JS support, and I think you should try having a word with Armin maybe..
Hope it helps,
Daniel -
When my most front window is a safari one and I use the shortcut key "Command N", it opens a new finder window and a new safari window at the same time. Why does it happen?
I just found the solution!
Niel
Re: Why is my Finder window popping up when I open my Safari window?
Jan 20, 2008 7:58 PM (in response to alak)
Open the General tab of the Safari preferences and correct the home page; the default page is this one. If it has become set to a folder on an FTP server or a local drive, that request will be sent to the Finder. (28252)
iMac Late 2007 Core 2 Duo, Mac OS X (10.5.1) -
Multiple entries in 'Open Width'using the above terminal command
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.fram ework/Support/lsregister -kill -r -domain local -domain system -domain user
I tried using the above terminal command to reset launch services but it does not seem to work. I still have multiple entries. What am I doing wrong?You may have to clarify. Multiple entries in Open With can be normal. For example if you have multiple versions of an application for whatever reason, they will all show. Plus, any applications that report being able to open a file type will show (had an annoyingly long list for text files on my old machine as some apps that didn't even handle documents such as games reported being able to open them).
-
Note 3 won't answer a call by using the "answer" voice command. Other voice commands work fine (ie 'volume up') and speech to text works fine. Tried it in the car and in a quiet room at home. What am I missing?
Rodilator,
We'll figure this out together! Can you please walk us through the exact steps you're taking to answer a call when it comes in?
SarahO_VZW
Follow us on Twitter @VZWSupport
Maybe you are looking for
-
Set up a Home Network? How do I do it & should I merge my accounts?
Hi Folks - this is my first post and its quite long, so please bear with me as I give you a bit of history of my problem. I bought a iMac and hooked it up to a Seagate 500GB hard disk using Time Machine in my study and connect to my ISP via WiFi usin
-
Code to call friends class method
Hello, Please can someone help me with friends class method call. in global classes Thanks Megh Moderator message: please search for available information/documentation before asking. Edited by: Thomas Zloch on Nov 2, 2010 5:29 PM
-
I'm trying to send music, scores and audio, as e-mail attachments, with a copy to my e-mail address. Whether I use .mus, .pdf, or .mp3, the error message says Preview doesn't recognize the file format. I haven't seen Preview, or had any problems, b
-
Can I change to the new promotion for student/teacher?
Can I change to the new promotion for student/teacher from a premiere single app membership? I have already been cleared as a Teacher for my purchase of Lightroom.
-
How do i install and run labview from a local network?
How do I install a single copy of labview on our local network. Are their any special licences needed for this?