A command-line interface (or CLI) is a method of interacting with your OS or software by typing commands on your keyboard.

learn more… | top users | synonyms (3)

3
votes
1answer
2k views

How to Kill Java Process in Windows, without killing java.exe through command line?

I need to kill the process activemq-all-5.5.1.jar(....\app-launcher\target\lib\activemq-all-5.5.1.jar). I use taskkill /im java.exe, but it kills all other applications related with java. I need to ...
2
votes
2answers
2k views

how to run an executable file without EXE extension using CMD script?

The situation is that I have a portable application that needs to have set environment variable. Other way it tries to set it's settings in user program data dir. No not accidentally run it in ...
1
vote
2answers
195 views

Stop .exe in command window from restarting computer after uninstall

I am uninstalling a Cisco Agent Desktop maintenance update from several thousand client machines and I'm unable to stop it from restarting. An MSI file is calling an srRollbackRepair.exe file that ...
0
votes
1answer
14 views

Escape brackets when using SED

I would like to replace the value varchar(36) with char(36) in a file by using sed. I am trying with sed -i ’s/varchar(36)/char(6)/g’ calls_contacts.sql But the command does not execute. What am I ...
4
votes
3answers
8k views

On Linux, how can I find all files that contain a string and delete them?

I want to delete all files that contain the string foo. How can I do this using bash in Linux?
8
votes
4answers
9k views

How to obtain maximum compression with .tar.gz?

The way i understand the use of tar + gzip is that tar is normally used to consolidate a grouping of files into a single file, then gzip is used to compress that file. I recently learned that tar can ...
2
votes
1answer
30 views

access is denied while CD a folder in Windows 98

I have a folder named Protel in Windows 98. I can normally browse it using windows explorer but when I try command cd protel from command prompt it say Access is Denied I know windows 98 has only ...
1
vote
1answer
66 views

Line-wrapping `less` in OS X (specifically for use with 'git diff')

Using less +-S does not work (although it does ask Chop long lines (press RETURN)), and entering -S once inside less also does not work. Is there a solution? I am usig OS X Mavericks (10.9.3). ...
0
votes
1answer
30 views

Associating a renamed executable with our application fails on command line in Windows

This is on Windows 7. We've got a program we install that we've associated with extension .xyz. Our '.xyz' files are actually executable files (originally .exe) If you double-click the renamed ...
0
votes
1answer
177 views

Different behaviour when running exe from command prompt than in windows

Forgive me if I'm not using the correct terminology here but I'll try to explain the issue I'm having as best I can! We use a program that allows you to view video footage from several cameras, and ...
3
votes
2answers
465 views

Program to check/look up UTF-8/Unicode characters in string on command line?

I've just realized I have a file on my system; it lists normally: $ ls -la TΕSТER.txt -rw-r--r-- 1 user user 8 2013-04-11 18:07 TΕSТER.txt $ cat TΕSТER.txt testing ... yet, it crashes a piece of ...
2
votes
4answers
18k views

How to mount a drive from terminal in Ubuntu?

I want to mount a drive from terminal at startup. At startup if I use ls /media, I notice that it is empty. If I go to Computer and click on VM drive there, I can then see the VM driver in ls /media. ...
1
vote
0answers
20 views

I copied a folder with copy&paste instead of 'xcopy'. How to fix that?

I copied a folder (Windows Server 2003) with copy-paste instead of 'xcopy' or 'robocopy'. Now I lost the original permissions, and I can't re-do the copy process (can't access the original folder). ...
0
votes
0answers
13 views

Handle.exe creates Handle64.exe & hangs thereafter

On windows server 2008 R2 ,In a folder I have handle.exe along with psexec.exe and a batch file name test.bat with following content: psexec -s D:\data\handle.exe -p taskhost.exe > ...
0
votes
2answers
69 views

shell script to start and stop executable jar in linux environment

I have to write start and stop script for an executable jar ex. executable.jar How to do it using shell scripting? I got success to do it for Windows environment with .bat file. But not able to ...
2
votes
1answer
2k views

Trouble copying a folder from my computer to another network computer using ROBOCOPY

I am trying to write a batch file to copy all files and subfolders in a folder from my local machine to another machine on our network. I am trying to use the ROBOCOPY command and would like the ...
2
votes
3answers
18k views

How to run .js file from a command line on windows?

I have a shortcut with 'target' "C:\Users\Public\TestPro\TestPro Automation Framework\taf.js". I want to run that from a batch file so I copied the "C:\Users\Public\TestPro\TestPro Automation ...
1
vote
2answers
45 views

Equivalent of (foo &>/dev/null &) in Windows shell

I'd like to run a particular application (let's call it foo) from the command line, but I don't want it holding up the terminal, putting any junk in the terminal from its output or error streams, and ...
1
vote
1answer
23 views

Upload image to postimage.org using curl

I found a script that can upload image to postimage.org using curl. It was posted not long ago, on 2013-09-06, at http://crunchbang.org/forums/viewtopic.php?id=28867. The simplified script looks like ...
1
vote
0answers
33 views

Working git from the command line

So I use Github for Windows (that fancy GUI app) to manage my various git-based projects, but I've noticed that on my machine I can't use the command line git to do anything with my projects. From the ...
14
votes
2answers
30k views

How to execute a bash script?

So I've written my first bash script: #!/bin/bash echo 'hello world!' exit I know it has the right location to bash and is executable: $ which bash /bin/bash $ chmod +x myscript.sh Now I want to ...
1
vote
1answer
4k views

What is the meaning of “spawn” linux shell commands ? (Centos6)

I need to know how to setup a cron job that automatically connects to the remote server and change the directory and get all the files in that directory to local i think i have to use sftp but i saw ...
1
vote
1answer
2k views

CutePDF command line or equivilant

Is it possible to run a command that will automatically print to file using CutePDF? I have tried this and still no luck: print C:\test.doc /D:CPW2 If not any other suggestion on how to automate a ...
2
votes
2answers
2k views

Dos executable lookup except PATH

I have a cmd open (Windows 7), and I type "java.exe", and the system finds the executable at c:\program files\java\jre6\bin. However, this folder is not in the path. What other mechanism affect the ...
82
votes
6answers
52k views

What's different between Ctrl+Z and Ctrl+C in Unix command line?

I'm using Mac OS X Terminal. And I use Ctrl+Z or Ctrl+C to stop some programs. But I realized that I don't know what they're exactly doing. What are they and what's the difference between them? ...
1
vote
2answers
26 views

Start application from a numbered list of choices

I want to display all applications dynamically within a folder in a numbered list, and launch them by entering the number associated with the application. So far I have the easy part working, the ...
7
votes
6answers
19k views

How can I delete all files/subfolders in a given folder via the command prompt?

I would like to delete all files and subfolders in a batch file in Windows 7 and keep the top folder. Basically emptying the folder. What's the command line instruction for that?
10
votes
6answers
34k views

Windows equivalent of ls * (asterisk) directory wildcarding?

Another question from an long-time Unix/Linux user who finds himself in a Windows world. First let me explain exactly what I'm trying to do. I'm using the Windows cmd.exe shell, and I want to list ...
7
votes
7answers
4k views

Screen Capture - command line?

Is there a command line tool out there that can record your computer screen and audio device and then save that to a file?
0
votes
0answers
39 views

Can't add Android platform to Cordova project as 'the command “android” failed'

I'm having trouble adding the Android platform to my Cordova project. When attempting to add the platform, I get the following error: Error: The command "android" failed. Make sure you have the ...
71
votes
4answers
156k views

How can I display the contents of an environment variable from the command prompt in Windows 7?

In Windows 7, when I start the Command prompt, is there any command to display the contents of an environment variable (such as the JAVA_HOME or PATH variables)? I have tried with echo $PATH, echo ...
0
votes
0answers
53 views

Windows Server 2012 Can't Delete Folder/Files

I've got a folder with two ISO files in it and I don't need them anymore, however I can't delete the folder! I am an administrator and also the owner of the files. When I try and delete using windows ...
2
votes
3answers
315 views

Run command in the background/menu bar

Instead of running a command in terminal, is it possible to run it 'in' the menubar in the background? To keep the firewall open within the network I am in I use curl to ping a url every 5 minutes, ...
0
votes
1answer
24 views

Is there a way to eliminate the owner and group from `ls -l`?

I never need to see the owner and group for the files listed with ls -l (actually, ls -laF) and am wondering if there's a way to remove them from the output. So I want to change this: lrwxr-xr-x 1 ...
52
votes
12answers
25k views

How to supress “Terminate batch job (Y/N)” confirmation?

In cmd, when we press Ctrl+C we get the target application terminated but if the target application is called from a batch file, we get this "Terminate batch job (Y/N)" confirmation. I can never ...
23
votes
3answers
2k views

What is the Linux command that encapsulates almost all of the other commands?

I remember that for Linux running in embedded systems, due to size limitations, it can't pack as many commands as in ordinary workstations. So there is a do-it-all command that can mimic almost all ...
4
votes
6answers
10k views

Move files from multiple folders all into parent directory with command prompt

I have multiple .rar files in multiple folders like this: C:\Docs\Folder1\rarfile1-1.rar C:\Docs\Folder1\rarfile1-2.rar C:\Docs\Folder1\rarfile1-3.rar C:\Docs\Folder2\rarfile2-1.rar ...
0
votes
3answers
2k views

run 'net user' command as administrator

I was writing a simple batch file with the following command net user Abhi * where Abhi is my username and I am the administrator of my computer. On execution, it prompts for a password and then ...
1
vote
1answer
688 views

Command to open windows explorer window with filtered results?

Is there any way to open a windows explorer window with the contents already filtered as if you'd entered them into the search window in the corner? So I'd like to type directly into the Start Menu ...
0
votes
0answers
30 views

Open pwd protected http stream in vlc from Linux CLI

Can anyone please advise me on how to open a pwd protected http stream from CLI in vlc? I checked out the --help and man pages, but they seem to offer only syntax for opening ftp, rmt and smb pwd ...
1
vote
2answers
214 views

How can I “grep” recursively filtering the name of the files I want with wildcards?

When I want to perform a recursive grep search in the current directory, I usually do: grep -ir "string" . But that command searches inside all kinds of files, including binary files (pictures, ...
3
votes
2answers
1k views

How to mass remove symbolic links in Windows (amongs regular files that share similar name in many folders)?

Is there anyway to quickly remove many symbolic links in many folders that contains many other files. E.g some command in command prompt (be able to delete all slink created from day XX for example)? ...
39
votes
7answers
74k views

Using cd Command in Windows Command Line, Can't Navigate to D:\

This may be a stupid question, and I think I have looked elsewhere to find the answer... Might be a path issue, but when I open the command line and type from the C:\>: cd D:\ I cannot get to ...
0
votes
2answers
194 views

Powershell: gci filter with compact output

I want to find files recursively, and for that I am using > gci -name -filter *.py -r Option -name gives only the file name, to get one line per item found, as required. But the items that I get ...
0
votes
3answers
82 views

Windows 7 Turn off System Restore Via Command Line

Im trying to turn off System restore via the command line. This is the command im using Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore" /V DisableSR /t ...
2
votes
3answers
2k views

How to set to a variable, the result of a expression

I need to extract the date of a file, for then use this string as part of the name of a new file. I trying to solve this using the next commands: First I get the details of the file and redirect the ...
0
votes
0answers
35 views

FTP.exe ls to local Output File Permission Denied on Local Network

I am trying to access a directory on my Filezilla FTP server using the ftp command in Windows from a local computer on the network, and then put a list of all those files in the directory in a text ...
29
votes
6answers
24k views

scp to remote server with sudo

I have a file on server A (which is behind a NAT so not directly addressable). The file needs to be copied to server B in a directory restricted to root. I have an account on server B with sudo ...
1
vote
1answer
159 views

How to add a script that runs from the OS X menubar

I'm using ssh extensively and I want to be able to click on a button on the OS X menubar that opens the Terminal and does: ssh -p myport myserver Such that I only have to type in my password, and ...
3
votes
2answers
461 views

Empty bash command line

I am looking for a way to delete the currently entered command line without wasting seconds on the Backspace key. For example I scrolled the bash history and have a long command line that would ...