Search Results

Search found 20946 results on 838 pages for 'command'.

Page 3/838 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Command to zip a directory using a specific directory as the root

    - by Slokun
    I'm writing a PHP script that downloads a series of generated files (using wget) into a directory, and then zips then up, using the zip command. The downloads work perfectly, and the zipping mostly works. I run the command: zip -r /var/www/oraviewer/rgn_download/download/fcst_20100318_0319.zip /var/www/oraviewer/rgn_download/download/fcst_20100318_0319 which yields a zip file with all the downloaded files, but it contains the full /var/www/oraviewer/rgn_download/download/ directories, before reaching the fcst_20100318_0319/ directory. I'm probably just missing a flag, or something small, from the zip command, but how do I get it to use fcst_20100318_0319/ as the root directory?

    Read the article

  • Running Command via Java ProccesBuilder Different to Running the same in the Shell

    - by Tom Duckering
    I'm tearing my hair out trying to work out why the command I'm executing via Java using a ProcessBuilder & Process is not working. I run the "same" command at the Windows command line and it works as expected. It must be that they're not the same but I can't for the life of me work out why. The command is this: ccm start -nogui -m -q -n ccm_admin -r developer -d /path/to/db/databasename -s http://hostname:8400 -pw Passw0rd789$ The output is should be a single line string that I need to grab and set as an environment variable (hence the v. basic use of the BufferedReader). My Java code, which when it runs the command gets an application error, looks like this with entry point being startCCMAndGetCCMAddress(): private static String ccmAddress = ""; private static final String DATABASE_PATH = "/path/to/db/databasename"; private static final String SYNERGY_URL = "http://hostname:8400"; private static final String USERNAME = "ccm_admin"; private static final String PASSWORD = "Passw0rd789$"; private static final String USER_ROLE = "developer"; public static List<String> getCCMStartCommand() { List<String> command = new ArrayList<String>(); command.add("cmd.exe"); command.add("/C"); command.add("ccm"); command.add("start"); command.add("-nogui"); command.add("-m"); command.add("-q"); command.add("-n "+USERNAME); command.add("-r "+USER_ROLE); command.add("-d "+DATABASE_PATH); command.add("-s "+SYNERGY_URL); command.add("-pw "+PASSWORD); return command; } private static String startCCMAndGetCCMAddress() throws IOException, CCMCommandException { int processExitValue = 0; List<String> command = getCCMStartCommand(); System.err.println("Will run: "+command); ProcessBuilder procBuilder = new ProcessBuilder(command); procBuilder.redirectErrorStream(true); Process proc = procBuilder.start(); BufferedReader outputBr = new BufferedReader(new InputStreamReader(proc.getInputStream())); try { proc.waitFor(); } catch (InterruptedException e) { processExitValue = proc.exitValue(); } String outputLine = outputBr.readLine(); outputBr.close(); if (processExitValue != 0) { throw new CCMCommandException("Command failed with output: " + outputLine); } if (outputLine == null) { throw new CCMCommandException("Command returned zero but there was no output"); } return outputLine; } The output of the System.err.println(...) is: Will run: [cmd.exe, /C, ccm, start, -nogui, -m, -q, -n ccm_admin, -r developer, -d /path/to/db/databasename, -s http://hostname:8400, -pw Passw0rd789$]

    Read the article

  • Problem of * in Command line argument

    - by Nithya
    Hi, This is simple question only... i did a program in java that accepts input via command line arguments. I get input of two numbers and operator in command line. multiplying two numbers, i have to give input as 5 3 *. But if i give like this, i cant get answer. Y its not accept * in cmd.... waiting for reply guys...

    Read the article

  • How to mount nexus 7 file system to view files from command line

    - by knotech
    Just got a Nexus 7, switched MTP on and plugged it in. It pops right up in nautilus, is titled Nexus 7, and lets me browse all of the files. However, on the command line, it's simply listed as /media/usbdrive and when I try to list the files, nothing comes up. Do I have to manually mount it in order to navigate the files from the command line? And why is it that nautilus recognizes it, and has access immediately, but I can't get at it from the command line?

    Read the article

  • Retrieve a command from another, remote bash session

    - by Oli
    So I was on our laptop, SSH'd into my desktop, dropping some mad bashfu skill. There was one command I ran which was particularly skilful. I'm now about minute walk from the laptop and I really want that command here on my desktop, so that I can run it again. I realise I've already spent more time that it would have taken to rewrite it, but this has raised a common issue I have with bash history. I know I can force it to update each command, but I haven't... so: Is there any way to get a history from a different, live bash session?

    Read the article

  • Input to program without command-line arguments

    - by Core Xii
    Let's assume that there are no command-line arguments. How do you pass input data to a program? I'm thinking you'd write the input to a file with a specific name, such that the program knows to open and read it as input. However, how would one discover the name of that file? Usually, running a command-line program without arguments or with some standard help argument (e.g. \?) produces some instruction on how to use it. But given an environment with no command-line arguments, how does one discover how to operate a program?

    Read the article

  • C# and T-SQL command-line Utility

    - by Chad Sellers
    Group, Part 1: I'm currently working on a command line utility that can take args and update a local database. The only issue I have is once i established a "Data connection"..how can I use those args for queries and searches. For example: ~//arrInput.exe "parm1" "pram2" "pram3" Part 2: I would like to take in command line args and use them as input parms for a "stored proc". Once finished execution....used the same inputs crate a log file. For example output file: mm-dd-yyyy hh:mm:ss - pram1,pram2,... pram1: updated/failed pram2: update/failed Thanks, Chad

    Read the article

  • Modify cmd.exe properties using the command prompt

    - by CodexArcanum
    Isn't that nicely recursive? I've got a portable command prompt on my external drive, and it has a nice .bat file to configure some initial settings, but I'd like more! Here's what I know how to set from .bat: Colors = (color XY) where x and y are hex digits for the predefined colors Prompt = (prompt $p$g) sets the prompt to "C:\etc\etc " the default prompt Title = (title "text") sets the window title to "text" Screen Size = (mode con: cols=XX lines=YY) sets the columns and lines size of the window Path = (SET PATH=%~d0\bin;%PATH%) sets up local path to my tools and appends the computer's path So that's all great. But there are a few settings I can't seem to set from the bat. Like, how would I set these up wihtout using the Properties dialogue: Buffer = not screen size, but the buffer Options like quick edit mode and autocomplete Popup colors Font. And can you use a font on the portable drive, or must it be installed to work? Command history options

    Read the article

  • Advanced command line argument parsing in Java?

    - by Bishop87
    Does anyone have any java examples for parsing a series of command line arguements in a robust way? I'm looking to be able to handle something like: java myapp [-l language] [-d int] [-f file1 file2 file3] I want to do this in a robust way so I can provide logical error messages to the user if they mistake a command line-option. Some of these options I'd like to make optional, etc, etc. Also, the -f file list should be able to handle a list of files. Is there some library out there to assist me in handling this?

    Read the article

  • Using 'Copy as cURL' from Chrome in windows command line

    - by user2029890
    So, Google Chrome as this great 'copy as cURL' option under 'Network' of the Chrome DevTools. Works great in command lines for linux but not in windows. Apparently it has something to do with the single quotes as the error I get is protocol 'http not supported In other words its reading that single quote. Is there a simple way to make this formatable for windows? I tried replacing all the single quotes with double quotes but then nothing happens at all. The command is: curl 'http://www.test.com/login/' -H 'Cookie: PHPSESSID=7dvb25maaaaaa9d7bbbbbc3f6' -H 'Origin: http://www.test.com' -H 'Accept-Encoding: gzip,deflate,sdch' -H 'Host: www.test.com' -H 'Accept-Language: en-US,en;q=0.8' -H 'User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36' -H 'Content-Type: application/x-www-form-urlencoded' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8' -H 'Cache-Control: max-age=0' -H 'Referer: http://www.test.com/login/' -H 'Connection: keep-alive' --data 'loc=&login=user%40test.com&password=password&submit1=Sign+In' --compressed Thank you

    Read the article

  • Command-line to list DNS servers

    - by Anurag Uniyal
    Is there a command to list dns servers? I tried $ cat /etc/resolv.conf # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN nameserver 127.0.0.1 $ cat /etc/network/interfaces # interfaces(5) file used by ifup(8) and ifdown(8) auto lo iface lo inet loopback But it doesn't list any servers, if I go to "Network GUI Tool", in Wireless section it lists "DNS 192.168.1.1 8.8.8.8 8.8.4.4" Can I get same information from command line? I am using Ubuntu 12.04 LTS

    Read the article

  • How to add GUI to command-line Ubuntu?

    - by SlimGG
    I had installed Ubuntu on a VM, with a command-line only interface, now I have had enough of command-line interface experience and plan to proceed with GUI mode. But I dont want to install a fresh copy of Ubuntu with GUI mode; I want my current [CLI] to have GUI. I have Ubuntu 12.04 LTS installed as CLI, and desired to have some light-weight (less resource consuming, slow-system friendly) GUI. What are my options and how can I accomplish this?

    Read the article

  • Make it so you can't stop command with CTRL+C

    - by Xero
    So, I was playing some Zork 1, and I went to copy some text to show a friend of mine I accidentally forgot to hold the shift key when pressing CTRL+C. This stopped the command and I lost my Zork data, is there some sort of "helpful" tip out their that I can to prevent from stopping the command when press the keys CTRL+C? Note that I'm running the game zork via Terminal (emulator), I installed it with these steps: http://www.eugenemdavis.com/playing-zork-linux-frotz

    Read the article

  • What's the command to open the Unity Dash?

    - by Scintoon
    I would like to know the command (from the Terminal) which opens the Unity dash, the reason being I want to create a desktop icon that starts the dash instead of the 'Windows Key' for keyboard-free use of the computer (I miss the old Ubuntu-Tweak effect where putting your mouse to the corner of the desktop would reveal Expo or Scale effects - by the way, is it possible to get it back?) Making a launcher (Application, Name, Command, Comment, etc) I tried the commands 'Unity', 'Dash' and other things, but I didn't manage to get it to work. I am using version 12.04

    Read the article

  • How to edit pdf metadata from command line?

    - by bdr529
    I need a command line tool for editing metadata of pdf-files. I'm using a Aiptek MyNote Premium tablet for writing my notes and minutes on this device, import them later and convert them to pdf automatically with a simple script using inkscape and ghostscript. Is there any command line tool to add some categories to the pdf's metadata, so i can find the pdf later (e.g. with gnome-do) by categories?

    Read the article

  • best command line tool to join videos

    - by user1079002
    I have used ffmpeg, but with it you have to first make mpg videos then do cat video1.mpg video2.mpg > joined.mpg and then convert to joined.mpg to joined.mp4 with ffmpeg to be able to upload on youtube. I heard there's mencoder which can join avi files without converting to mpg and using cat command. I'm making videos to upload on youtube so it needs to be avi mp4 or flv format. Which tool is the best to join videos from command line?

    Read the article

  • How can I pass more than one command line argument via c#

    - by user293392
    I need to pass more than one command line argument via c# for a process called handle.exe: http://www.google.com.mt/search?sourceid=chrome&ie=UTF-8&q=handle.exe First, I need to run the executable file via ADMINISTRATOR permissions. This post has helped me achieve just that: http://stackoverflow.com/questions/667381/programatically-run-cmd-exe-as-adminstrator-in-vista-c But then comes the next problem of calling the actual line arguments such as "-p explore" How can I specify the command line arguments together, or maybe consecutively? Current code is as follows: Process p = new Process(); ProcessStartInfo processStartInfo = new ProcessStartInfo("filePath"); processStartInfo.CreateNoWindow = true; processStartInfo.UseShellExecute = false; processStartInfo.RedirectStandardOutput = true; processStartInfo.RedirectStandardInput = true; processStartInfo.Verb = "runas"; processStartInfo.Arguments = "/env /user:" + "Administrator" + " cmd"; p.StartInfo = processStartInfo; p.Start(); string output = p.StandardOutput.ReadToEnd(); p.WaitForExit(); Console.WriteLine(output); Thanks

    Read the article

  • Connect to bluetooth device from command line

    - by Ilari Kajaste
    Background: I'm using my bluetooth headset as audio output. I managed to get it working by the long list of instructions on BluetoothHeadset community documentation, and I have automated the process of activating the headset as default audio output into a script, thanks to another question. However, since I use the bluetooth headset with both my phone and computer (and the headset doesn't support two input connections) in order for the phone not to "steal" the connection when handset is turned on, I force the headset into a discovery mode when connecting to the computer (phone gets to connect to it automatically). So even though the headset is paired ok and would in "normal" scenario autoconnect, I have to always use the little bluetooth icon in the notification area to actually connect to my device (see screenshot). What I want to avoid: This GUI for connecting to a known and paired bluetooth device: What I want instead: I'd want to make the bluetooth do exactly what the clicking the connect item in the GUI does, only by using command line. I want to use command line so I can make a single keypress shortcut for the action, and would't need to navigate the GUI every time I want to establish a connection to the device. The question: How can I attempt to connect to a specific, known and paired bluetooth device from command line? Further question: How do I tell if the connection was successful or not?

    Read the article

  • Select (loop) or command not working in shell-script

    - by user208098
    I've been tinkering with Linux and Unix for years but still a novice in my mind and recently find myself trying to be more pro with it as I work in IT. So with that notion I'm studying shell scripting. I've hit a snag in ubuntu using the latest version 13.10 Saucy. When I use the select command in a sh script it doesn't work, depending on how I format the command it will either return Unexpected "do" or Unexpected "done". See the following two examples: This section of code produces an unexpected "do" error: #/bin/bash PS3='Please enter your choice' select opt in option1 option2 option3 quit do case $opt in "option1") echo "you chose choice 1" ;; "option2") echo "you chose choice 2" ;; "option3") echo "you chose choice 3" ;; "quit") break ;; *) echo invalid option ;; esac done This section of code produces an unexpected "done" error. #/bin/bash PS3='Please enter your choice' select opt in option1 option2 option3 quit ; do case $opt in "Option1") echo "you chose choice 1" ;; "Option2") echo "you chose choice 2" ;; "Option3") echo "you chose choice 3" ;; "quit") break ;; *) echo invalid option ;; esac done When I enter these parameters into the command line interactively or manually I get the desired result which is a list of choices to choose from. However when executed from a script I get the before mentioned errors. Also a side note I have tried this in Fedora as a script and it worked perfectly so my question is why isn't it working in Ubuntu, is this a difference between RHL and Debian? Or is it a bug in the latest version of Ubuntu? Thanks in advance for any help! KG

    Read the article

  • How to run a command as administrator in Windows?

    - by tech
    I want to run a console program in Windows, but it required administrative privileges. So, I can right click the command prompt to run as administrator, but I want to use something from the command line to elevate the program. Is there something like sudo in Windows?

    Read the article

  • Using ssh for remote command

    - by user1663479
    I need to use ssh to execute a remote command such as: ssh -l jsilva xman /vol/2011/linux_x64/exe/mx201111.exe When I execute ssh I receive error message: /cmg/2011.11/linux_x64/exe/mx201111.exe: error while loading shared libraries: libmkl_intel_lp64.so: cannot open shared object file: No such file or directory This application uses the variable LD_LIBRARY_PATH. I inserted this variable into /etc/profiles in localhost and remote host. The filesystem /cmg is mounted by autofs for both hosts (local and remote). Anybody have idea how to resolve this problem? Thanks!

    Read the article

  • Accessibility bus warning when opening files in Eclipse from command line (Ubuntu 13.10)

    - by Reese
    Similar to closed issue Gnome Menu Broken? When opening a file from the command line for edits in Eclipse , I get this warning: ** (eclipse:nnnn): WARNING **: Couldn't register with accessibility bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken. The 4-digit number at (eclipse:nnnn) changes each time I issue an 'eclipse some/file.ext' command. The file opens but the warning is an annoyance that shouldn't be happening, it may be indicative of some other problem. Updated Ubuntu 13.10 64-bit, updated Eclipse Luna.

    Read the article

  • Create USB installer from the command line?

    - by j-g-faustus
    I'm trying to create a bootable USB image to install Ubuntu on a new computer. I have done this before following the "create USB drive" instructions for Ubuntu desktop, but I don't have an Ubuntu desktop available. How can I do the same using only the command line? Things I've tried: Create bootable USB on Mac OS X following the ubuntu.com "create USB drive" instructions for Mac: Doesn't boot. usb-creator: According to apt-cache search usb-creator and Wikipedia usb-creator only exists as a graphical tool. "Create manually" instructions at help.ubuntu.com: None of the files and directories described (e.g. casper, filesystem.manifest, menu.lst) exist in the ISO image, and I don't know what has replaced them. unetbootin scripting: Requires X server (graphics support) to run, even when fully scripted. (The command sudo unetbootin lang=en method=diskimage isofile=~/ubuntu-10.10-server-amd64.iso installtype=USB targetdrive=/dev/sdg1 autoinstall=yes gives an error message unetbootin: cannot connect to X server.) Update Also tried GRUB fiddling: Merging information from pendrivelinux.com a related question on the Linux Stackexchange and a grub configuration example I was able to get halfway there - it booted from USB, displayed the grub menu and started the installation, but installation did not complete. For reference, this is the closest I got: sudo su # mount USB pen mount /dev/sd[X]1 /media/usb # install GRUB grub-install --force --no-floppy --root-directory=/media/usb /dev/sd[X] # copy ISO image to USB cp ~/ubuntu-10.10-server-amd64.iso /media/usb # mount ISO image, copy existing grub.cfg mount ~/ubuntu-10.10-server-amd64.iso /media/iso/ -o loop cp /media/iso/boot/grub/grub.cfg /media/usb/boot/grub/ I then edited /media/usb/boot/grub.cfg to add an .iso loopback, example grub entry: menuentry "Install Ubuntu Server" { set gfxpayload=keep loopback loop /ubuntu-10.10-server-amd64.iso linux (loop)/install/vmlinuz file=(loop)/preseed/ubuntu-server.seed iso-scan/filename=/ubuntu-10.10-server-amd64.iso quiet -- initrd (loop)/install/initrd.gz } When booting from USB, this would give me the Grub boot menu and start the installer, but the installer gave up after a couple of screens complaining that it couldn't find the CD-ROM drive. (Naturally, as the box I'm installing on doesn't have an optical drive.) I resolved this particular issue by giving up and doing the "create USB drive" routine using the Ubuntu Live desktop CD (on a computer that does have an optical drive), then the USB install works. But I expect that there is some way to do this from the command line of an Ubuntu system without X server and without an optical drive, so the question still stands. Does anyone know how?

    Read the article

  • How to edit pdf metadata from command line?

    - by bdr529
    I need a command line tool for editing metadata of pdf-files. I'm using a Aiptek MyNote Premium tablet for writing my notes and minutes on this device, import them later and convert them to pdf automatically with a simple script using inkscape and ghostscript. Is there any command line tool to add some categories to the pdf's metadata, so i can find the pdf later (e.g. with gnome-do) by categories? Update: I tried the solution with pdftk and it works, but it seems that gnome-do doesn't take care of pdf-metadata. Is there a way to get gnome-do to do that?

    Read the article

  • cd command not working anymore

    - by dystroy
    I just did two things : install scm_breeze and mercurial : git clone git://github.com/ndbroadbent/scm_breeze.git ~/.scm_breeze ~/.scm_breeze/install.sh sudo apt-get install mercurial And now my cd command seems to be gone : dys@dys-tour:~/prog> cd ~ bash: /home/dys : is a folder dys@dys-tour:~/prog> cd .. .. : command not found The terminals I opened before installing scm_breeze and mercurial are fine. The terminals I open now have the problem. I uninstalled scm_breeze, with no result. What can I do to diagnose the problem and fix it ?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >