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
1answer
34 views

Script to delete folder with time condition [duplicate]

I wrote a command to create a folder named with day's date and copy some file and folders to it. @echo off for /f "tokens=1,2,3,4 delims=/ " %%a in ("%date%") do set wday=%%a&set month=%%b&...
1
vote
1answer
26 views

Sum numbers in filenames in a directory using command line

I'd like to have a sum of real-time sales-tax exposure on my desktop. I name all my purchases and expenses the same way: date {string} SPACE item{string} SPACE amount{string}, the latter will always ...
0
votes
0answers
8 views

How can I display a tmux pane only when the output changes?

I'd like to display the output of a static-analyzer only when there is output to display (most of the time, it simply outputs “No errors!”). When there is something to say, it spits out a ton of noise:...
0
votes
0answers
29 views

Can't get screen resolution through WMIC on fresh Windows 10 installation

Running wmic desktopmonitor get screenheight, screenwidth in Windows' command prompt should return my screen's height and width, however when running that command on my fresh Windows 10 install, no ...
0
votes
0answers
53 views

How to use Terminal command srm (or other) to secure delete a folder? Mac OS X El Capitan

When I try to use srm -m to secure delete an empty folder in Trash, I get the following: srm: /Users/tomhughes/.Trash/Recovered files is a directory
1
vote
1answer
31 views

ffmpeg multiple files dimensions change

I saw a post on superUser on changing dimensions of a mp4 file which like this FFmpeg -I Input.mp4 -vf scale=460:690 output.mp4 but I want to change dimensions of multiple mp4 files in one go so I ...
-1
votes
2answers
74 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
34 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
38 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
34 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
68 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: ./...
32
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
40 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 D:...
0
votes
0answers
134 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
27 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
69 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
38 views

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

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
32 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
81 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
35 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
14 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
48 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
14 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
18 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
23 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 device;...
0
votes
1answer
29 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" /anotherswitch:"...
0
votes
0answers
20 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
65 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
21 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
181 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
33 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
51 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
146 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 C:\...
1
vote
1answer
27 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
36 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
57 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
39 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 com.google.android....
0
votes
1answer
50 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
47 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
25 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
46 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
29 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
84 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
26 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
19 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
54 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
173 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?