What is linux command line equivalent of java.net.InetAddress.getLocalHost();
location: linuxexchange.com - date: January 30, 2015
I need to communicate with Network Admin, who doesn't know java, to fix a network setup issue that is revealed when getLocalHost() runs. The box is on two networks and getLocalHost() returns the wrong one. On all of our other servers, this does not happen. I want to be able to show the Network Admin using the command line, that something is wrong. But I'm not familiar enough with the linux network commands to know what to call.
Take picture from webcam using linux command line (bash) [closed]
location: linuxexchange.com - date: November 7, 2012
I am well aware that there is "exactly" the same question already asked, but it seems the user that posted the question initially never took an interest in the question, and the answers all were for windows systems.
I want to take a picture with the webcam every N time units and store it to /tmp/somefolder/ for further use with other tools and only keep the last M images.
The main problem is taking the picture to start with, the rest i would have pretty much covered, would be glad for any suggestions.
OS: Ubuntu 10.04 x86_64
Webcam: MS LifeCam VX2000 and/or Logitech C210 (both working with cheese)
writing to serial port from linux command line
location: linuxexchange.com - date: September 26, 2013
From windows I can communicate with a serial port device using following commands:
mode com1: baud=9600 data=8 parity=n stop=1
copy con com1
Device starts the requested operation.
When I try to accomplish the same operation from a stand alone debian box or from a debian virtualbox instance of the same windows machine, I had no luck so far.
Here's equivalent linux commands(at least I think so)
stty -F /dev/ttyS0 speed 9600 cs8 -cstopb -parenb
echo '\x12\x02' > /dev/ttyS0
Can somebody please direct me to the right direction?
How do I connect to an open SSID in Java using a Linux command line prompt?
location: linuxexchange.com - date: June 25, 2013
For example, my approach on a Windows machine would be the following:
Runtime rt = Runtime.getRuntime();
process = rt.exec("netsh wlan connect " + selectedSSID);
(Assuming all variables are initialized correctly)
What would be the best approach to this in a Linux machine? Would it be the same thing but I would call up ifconfig and the appropriate flags instead?
EDIT: Would I still have to call up Sudo? Since this code is in a GUI, the user is unable to interact with a command line prompt window.
Edit 2: So would my line of code look like this? rt.exec("sudo iwconfig eth1 essid " + selectedSSID);
sh file not found in linux command line
location: linuxexchange.com - date: November 28, 2014
I'm an owner of synology's diskstation NAS server running on special OS (mainly linux)
It has only access from internet. I established command line interface to access it using synology wiki. Now I try to install Counter-Strike server on it using SteamCMD. I just look in Valve Developer Community for it.
I'm writing the next:
tar xvfz steamcmd_linux.tar.gz
But the last line causes -sh: ./steamcmd.sh not found. However, I can see this file in the directory.
What actually can cause it?
The file is executable!
Is there a Linux command line tool sequence for converting XML files into a single HTML file?
location: linuxexchange.com - date: July 18, 2014
I have a bunch of XML files, and I would like to visualize them as tables in an HTML file. I have searched on the net and found a tutorial on XML->HTML conversion, and a bunch of blogs describing command line tools for HTML/XML/JSON conversion.
Is it possible to use command line tools in Linux to convert a bunch of XML files into a HTML file where each XML file is represented as a table?
Edit: More background information.
I actually want to analyze the XML output of Google Test, that I'm using to develop geometrical algorithms. Here is how the XML looks like for a single test application:
<?xml version="1.0" encoding="UTF-8"?>
<testsuites tests="27" failures="0" disabled="0" errors="0" timestamp="2014-07-18T10:27:10" time="0.002" name="AllTests">
<testsuite name="lineSegmentIntersection" tests="3" failures="0" disabled="0" errors="0" time="0">
<testcase name="halfspaceNoIntersection" status="run" time="0" classname="lineSegmentIntersection" />
How to lookup the meaning of exit codes for Linux command line utilities?
location: linuxexchange.com - date: February 29, 2012
I have my prompt (bash) configured to print out the exit code from the last command, if it wasn't successful (aka not zero). Therefore I'm seeing a lot of exit codes, even when a program seems to encounter no problems. Is there a way to lookup the meaning of these exit codes?
I always try the man pages, info pages or the "--help" option, but to no avail.
To clarify, I'm asking about the utilities that come with Linux, like cd, ls, du, ...
How to programmatically extract information from a web page, using Linux command line?
location: linuxexchange.com - date: February 27, 2013
I need to extract the exchange rate of USD to another currency (say, EUR) for a long list of historical dates.
The www.xe.com website gives the historical lookup tool, and using a detailed URL, one can get the rate table for a specific date, w/o populating the Date: and From: boxes. For example, the URL http://www.xe.com/currencytables/?from=USD&date=2012-10-15 gives the table of conversion rates from USD to other currencies on the day of Oct. 15th, 2012.
Now, assume I have a list of dates, I can loop through the list and change the date part of that URL to get the required page. If I can extract the rates list, then simple grep EUR will give me the relevant exchange rate (I can use awk to specifically extract the rate).
The question is, how can I get the page(s) using Linux command line command? I tried wget but it did not do the job.
If not CLI, is there an easy and straight forward way to programmatically do that (i.e., will require less time than do copy-paste of the dates
Linux command line howto accept pairing for bluetooth device without pin
location: linuxexchange.com - date: November 12, 2014
Is there a way to pair a device in linux without requiring a pin(for testing purposes so I need it to be done w/out human interaction, assuming you have root access)?
bluez-simple-agent seems to require a pin except with some simple devices such as mice.
Programmatically removing all bluetooth devices on the Linux command line
location: linuxexchange.com - date: April 24, 2014
I am able to scan for all available bluetooth devices with hcitool or with my C program.
I can pair the device using it's address with a simple-agent python script.
I would like to know if I can also remove the paired device using either hcitool, hciconfig or some kind of bluetooth command.
I know the information of detected devices for the hci0 controller is stored in /var/lib/bluetooth/XX:XX:XX:XX:XX:XX, where XX:XX:XX:XX:XX is the address of the hci controller.
This would be useful for testing pairing, connecting and disconnecting devices.
Page: 1 2 3 4 5 6 7 8 9 10