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)

-1
votes
2answers
47 views

echo $path returns blank on Mac

echo $path is returning blank for me. The following are contents of my .bash_profile. CHANGE PROMPT export PS1="►►" export TERM=xterm-color export GREP_OPTIONS='--color=auto' GREP_COLOR='1;32' ...
2
votes
1answer
23 views

Windows batch: Get the first folder name starting with some value?

I have a batch file in which I pass the name of the folder I want to use as a argument. But now I want to make it a little smarter by letting the user specify only the first few characters of the name ...
0
votes
1answer
29 views

How can I connect to bluetooth headphones from command line?

I have a pair of bluetooth headphones that, when started (or restarted) don't always trigger my computer to automatically connect to them. In those cases I have to go into the sound menu, find the ...
0
votes
1answer
33 views

Run windows command

(Moved the question here from StackOverflow) I am not familiar with windows. Please help with the following questions. The windows program is "xxx.exe". When running it, we can do "xxx -options" ...
0
votes
2answers
61 views

SSH Difference between ./ and sh

I wrote simple file "hello world" and try to execute it on virtual server by SSH. #!/bin/bash echo "Hello world" Of course I give chmod +x Then on one server I try to execute it by command: ...
31
votes
4answers
4k views

How do I determine if my system is Windows 10 using the command line? [duplicate]

I'm working with InstallAnywhere, an old program for creating installers. I would like to install a particular file, only in case of Windows XP and Windows Vista. Due to InstallAnywhere limitations, ...
0
votes
1answer
35 views

I want to schedule a batch file to execute a command and redirect that output a text file

I want to schedule a batch file to execute a command and redirect that output a text file. This is my current solution: Del \\10.112.232.10\Netbackup_Softwares\Personal\Bharath\VM_Query\switch.txt ...
0
votes
0answers
45 views

MINGW64 bash: wget: command not found

I am using git with MINGW64(install by git) on windows. MINGW64 is great, but lack of some command which rarely use on windows. Today, I just have a whim to figure out how to use wget in it. I found ...
0
votes
0answers
21 views

send SIGTERM with command line shortcut

I would like to be able to send the SIGTERM signal with a command line shortcut, like i can send SIGINT with Ctrl+C. I ve read before about ctrl+d, but that does not work here, nothing happen. I ...
0
votes
0answers
36 views

tabcal.exe command line switches

There is a utility on Windows 7 that allows you to do touch calibration, if you have a supported touch screen. The executable is tabcal.exe and it's located in: C:\Windows\System32 I'm look for a ...
2
votes
2answers
34 views

Get first two strings of each filename in a directory as a txt file

I need to clean up strings like this (where I read in a group of image names), where I only want the first two strings (currently I'm using, in Windows 7 cmd line - dir /a/b/p > textfile.txt): ...
1
vote
0answers
35 views

How do I use a batch script to find and copy specific files (.pdf) to targeted location from a list?

We have a lot of files (PDF format) in different folders, these folders are in one root folder. I have a text list of all the PDF file names I need to find and copy from these folders to a targeted ...
0
votes
1answer
25 views

What is the difference between properties `Name`, `Caption` and `DeviceID` (when executing `wmic LogicalDisk`)?

When executing the command line wmic LogicalDisk, several properties of all logical disks of the computer system are returned. Three of them are Name, Caption and DeviceID, having the same value per ...
1
vote
0answers
44 views

Vim Plugins within Git Bash for Windows

In an effort to improve the terminal usability in Windows I have setup ConEmu to use Git Bash for Windows as the default terminal. I use Vim Plug to manage my Vim Plugins, and have already set up the ...
0
votes
1answer
32 views

What's the difference between an “option” and a “switch?”

When running commands on Windows or Linux, it seems like the terms option or switch are used interchangeably. Is there a difference between the two?
1
vote
0answers
8 views

OS X: Create user-groups, that are not shown in Systempreferences “Users & Groups” PrevPane

I created some hidden Users on OS X, using dscl . -create /Users/<usershortname> IsHidden 1, that work as administraters. For some reasons, I like to place the HOME-folders of different groups ...
0
votes
0answers
36 views

Batch: Run with GPU command?

I have a laptop with nVidia and Intel graphics. When I launch a programm, by default it uses Intel graphics, but I can make it use nVidia. Question: Is there a way to do the same(run it with nVidia ...
1
vote
0answers
13 views

how can I get a Batch File to Delete a folder if it doesnt contain a specific file

Hi I'm new here and was hoping someone can help me with a problem I have. Over the years I have acquired a number of ebooks (several thousand). So I have decided to only keep my mobi and Epub books. ...
0
votes
2answers
16 views

Python script won't run from the context menu

Working on the basis of this post (and this follow-up post), I've tried adding a python script (which I've added to the path and so on, so that I can run it from the command line everywhere in the ...
1
vote
0answers
20 views

Strange response from a HTTP server

I noticed an unfamiliar device when scanning my local wireless network. It had two open (listening?) TCP ports; TCP/80 (http?) & TCP/443 (https?). In an effort to identify the unfamiliar ...
0
votes
1answer
21 views

Is it possible to get the Process ID of an Executable started in a PowerShell script using he 'Call' (`&`) operator?

Here is my issue. I run a command line application within a PowerShell script using the Call Operator (i.e. the & symbol), such that it is: & $PathToExe /switch:"lots of args" ...
0
votes
0answers
13 views

Software package fails installing because of permissions

I'm busy installing WS02 on Ubuntu 16.04 LTS Server edition, right now I am facing some problems regarding permissions I guess below is my terminal log. I checked the directory with $JAVA_HOME and ...
0
votes
0answers
55 views

What command will ensure a Command Prompt window always stays on top/at the front?

I am writing a silly little program in batch, and I want to make sure the CMD window is always at the front of any other windows that are called by the program. Here are a few lines as an example of ...
0
votes
1answer
26 views

How to erase certain lines from 10000 files efficiently

I have 10000 files in a directory. I would like to erase lines so that I keep 2 lines in the header, 2 lines at the tail, and every 100th line in the middle. For instance: #header1 #header2 0 x ...
0
votes
1answer
20 views

List all packages from a repository

I have been looking how to list all packages from a repository and I couldn't find it. For example, I add a repository (sudo add-apt-repository ppa:noobslab/icons) and I want to list all its packages ...
2
votes
1answer
74 views

Is there a way to cancel sfc /scannow in windows 7?

After launching the sfc /scannow resource checker from a command prompt or a batch file, is there any way to cancel the process or does the process have to be left to complete? In Windows XP, sfc ...
1
vote
0answers
26 views

Java runs in batch but not Powershell

I have a batch file that runs a jar with a few parameters, works fine: @echo off java -cp bulkconfig.020.0005.jar com.hospira.bulkconfig.LoadConfig %* I would like to add some more cababilities ...
0
votes
0answers
27 views

What is the correct syntax to set Signal to noise (SNR) offset or target noise margin in ZyXel AMG1202 t10b

I tried to find CLI reference for my router (ZyXel AMG1202 t10b) but couldn't find it on their website (there is for older and newer models but not for this one) I already contacted their support but ...
1
vote
1answer
55 views

schtasks with multiple actions

I am trying to create a schedule task using command line which has multiple actions running more than one batch files in sequence among other things SCHTASKS /Create /TN TaskName /SC ONLOGON /TR ...
1
vote
1answer
26 views

Get path relative to batch file - not working directory

I have a batch file in E:\dir0\dir1 that calls exe0.exe in that folder. I need the first argument to the exe to be E:\dir0\dir2\dir3\script.js. The problem is that the name of dir0 (and whatever ...
0
votes
1answer
32 views

ping command does not work without extension

all of a sudden my command prompt commands started giving problems. when I run ping.exe it works but when I run ping it says, 'ping' is not recognized as an internal or external command. same ...
0
votes
0answers
41 views

Could not start PsExec service on remote: The system cannot find the file specified

Here is the script I have compiled: @echo off REM This file assumes you have psexec installed REM Ask for machine name or IP set /p machine= Please enter the machine name or ip: REM check for ...
0
votes
1answer
36 views

How can I delete these leftover hard links?

I was working with many small files (about 1million) and for one reason or another had to create a bunch of hard links to them. Now I am trying to delete all this data, but can't. After removing the ...
0
votes
1answer
20 views

Command line program keep logging output into seperate window

I'm using a bat file to run some ADB command. This is the content: cd C:\AutoToolApx\AutoOffer\AutoOffer\bin\Debug adb connect localhost:5555 adb -s localhost:5555 shell pm clear ...
0
votes
1answer
40 views

Watch with awk command

How do you watch a command like? awk 'NR%2==0 {printf "%s %8.0f", $1, $5}' filename.txt Preceding this with "watch" gives this error: awk: cmd. line:1: fatal: cannot open file `{printf' for ...
1
vote
2answers
30 views

How to encrypt VM box via VBoxManage?

I've created VM box via Vagrantfile, however when I'm trying to encrypt the storage, I've got the following error: $ VBoxManage encryptmedium aaa-bbb-ccc-ddd-eee --newpassword - --newpasswordid ...
0
votes
0answers
24 views

Windows version of compgen

Is there a Windows command line equivalent for linux's bash compgen -c? Basically, I want a list of all commands that I can enter at the Command Prompt without having to use the full path to the ...
0
votes
2answers
45 views

Using another program through Windows Command Prompt

I know that I can launch programs from the Command Prompt, but is there any way to enter commands after opening that program? For example, if I open DOSBox from cmd, how would I enter a command in ...
1
vote
1answer
23 views

Completion of arguments for Cygwin commands not working due to `.exe` extension

When using tab completion in Bash on a Cygwin system to complete the name of a command, the .exe extension is appended to the command name, e.g, typing opens and pressing Tab completes the command to ...
0
votes
2answers
68 views

How to run exe file remotely?

I have an exe file placed on a remote server. I need to invoke it from other server directly/using a batch file. When I invoke using batch file it runs and it shows in the Task manager of invoking ...
0
votes
1answer
25 views

Calling a variable after underscore in Windows Command Prompt

In my batch file I am trying to call a variable after underscore. But the variable is not getting recognized if added after an underscore. set /p X=Folder name:%=% mkdir Delta_%X% So windows was ...
0
votes
1answer
18 views

Add backslash if a string doesn't have it

I'm developing a command line Batch file on Windows 7. I'm trying to add \ to a dir if it hasn't. This is only a test: @echo off set solutionDir=%CD%\ echo %solutionDir% if [%solutionDir:~-1%] ...
2
votes
1answer
38 views

How to kill a particular process(excel.exe) from command line?

My command goes as below: TASKKILL /FI "WINDOWTITLE eq Microsoft Excel - Book1 Mine.xlsx" ----> This works fine but when I save the same as "Book1 Mine.xsl" and run the same command TASKKILL /FI ...
6
votes
2answers
170 views

How do I check the current cmd aliases?

I know how to set command prompt aliases (using the doskey command) from another stack overflow thread, but given a command prompt, how do I find out which aliases are already set?
0
votes
1answer
71 views

Background process with stdOut/StdErr output in files and console

I want to SSH into a machine, start a process, write the stdErr and stdOut of the process into two seperate files while reading the stdOut/stdErr in the console. As soon as some specific lines were ...
1
vote
1answer
27 views

Different result from command line prog when run by Task Scheduler

I call the following program from within another command line prog... :: NT_getdate.cmd return yumd-date in var='ymd' @echo on setlocal for /F "tokens=2,3,4 delims=/ " %%g in ('echo.^|date /t') do ...
0
votes
0answers
14 views

How can I use the directory path of a batch file WITHIN that same batch file? [duplicate]

I want to use a batch file to create directories and copy other batch files to those directories. This is to automatically 'install' different batch programs by copying them to 'program files', ...
0
votes
1answer
25 views

Certain console apps “automagically” open a new console

Without installing anything new, certain console apps (eg xxcopy, diskpart) began to open a new console instead of displaying the output in the current console as usual: If I run CMD, a new console ...
0
votes
1answer
14 views

Why is php cgi loaded in path when doing a 'sudo su <user>" vs just being logged in which uses php cli?

When logged in as root user, php loads the correct version which is php cli. But when i do a sudo su < user >, php is is loading the cgi version which is breaking some of my applications that ...
0
votes
0answers
35 views

view files returned from shell commands

Very often I grep and find through directories (usually containing images) and I have to "visually" check the result before I can operate on the result (like deleting, moving, etc). E.g.: find ...