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)

0
votes
1answer
22 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
1answer
8 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
15 views

Windows alternative to 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
1answer
19 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 ...
0
votes
0answers
9 views

Bash completion for commands in Cygwin

When using tab completion in Bash on a Cygwin system to complete a command name, the .exe extension is appended to command names. Example: typing opens and pressing Tab completes the command to ...
0
votes
2answers
37 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
13 views

Calling a variable after underscore in Windows Command Prompt

In my batch file I am trying to call a variable after underscore. I assigned underscore to another variable and called both the variables and it works fine. Wanted to check if there is another way to ...
0
votes
1answer
14 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%] ...
1
vote
1answer
18 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 ...
5
votes
2answers
116 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
22 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
14 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
12 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
24 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
12 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
28 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 ...
0
votes
0answers
20 views

How to have error output from `ls` if target directory is empty

I'm currently learning how to use the Linux shell, getting to grips with the basic commands like cd, ls and pwd. My file structure is like so: user |-- documents |-- file1.pdf |-- file2.txt ...
1
vote
1answer
24 views

Windows Command Line - List Network Adapter Components

I'm looking for a way to, in a batch file, get a list of the components (such as NDIS drivers) in use by each network adapter on the system. Here's a screenshot of the info I want in the network ...
0
votes
0answers
5 views

How do you make php-cli as the default command in the terminal? It's currenltly running php-cgi

When I'm root and I do a php version. It shows that I am running php-cgi: but I need to use the php-cli version which resides in /usr/local/bin/php -- When I'm logged out of root as a regular user. ...
0
votes
0answers
25 views

Enable/Disable Windows 2 Step logon verification from the command line

Is it possible to Enable/Disable Windows 2 Step logon verification from the command line.
0
votes
0answers
22 views

How to direct (Python) error messages printed in a PowerShell console to a text file

Firstly, the errors I'm interested in redirecting are NOT PowerShell errors, but those generated by a Python script that is called within my PowerShell script. I have read multiple post on here (and ...
-2
votes
0answers
26 views

Rename one filename by appending another filename in subfolders in windows [on hold]

I need to rename bunch of pdf files by appending one file name to the other in sub folders. Parent folder has lot of subfolders and each subfolder contains two pdf files. eg., a subfolder contains ...
1
vote
1answer
22 views

Why is my code for checking for an internet connection failing?

I am trying to edit a script so that it will check for an internet connection before executing the rest of its commands, but the problem is that no matter what I try the result (online or not) the ...
1
vote
0answers
18 views

Controlling encoding of redirected win console command output

Here is what I want to do: Redirecting properly the output of console applications (I use the term command in the rest of the message) into a file with 1252 encoding (to make it readable from any ...
0
votes
0answers
19 views

Having a message box used as a variable in batch program

I am attempting to have a batch program pop-up with yes or no options and depending what the user clicks will determine what the program will do. for example: @echo off Echo x=msgbox^("Yes or ...
3
votes
2answers
34 views

How to find count of lines present in a file using batch script

I want to count the number of lines in a file using batch. I have gone through this, but couldn't understand as I am a beginner. I have written my own piece of code with basic knowledge. @echo off ...
0
votes
0answers
37 views

How to find mp3 files on a remote server using Powershell

I have created a powershell script to search for mp3 files on my workstation. This is successful on my workstation, how can I run this on my network of 80 workstations? $strComputers = Get-Content ...
0
votes
0answers
9 views

How to specify password on Windows command line when executing java -jar to extract files?

On Windows 7 I have pairs of .jar and .dat files from an Apple computer (export result files from another program), e.g. foo.jar foo.dat. I can extract the files by java -jar foo.jar. But this opens a ...
0
votes
1answer
36 views

What does these command do in command prompt?

xcopy /E /V /I /F /Y "C:\Program Files (x86)\Diablo III" "H:\programs\Diablo III" cmd /C rd /S /Q "C:\Program Files (x86)\Diablo III" cmd /C mklink /J "C:\Program Files (x86)\Diablo III" ...
0
votes
0answers
6 views

can we print Tiff file on command line using windows photo viewer?

can we print Tiff file on command line using windows photo viewer? are there any command line options available to pass to windows photo viewer ?
1
vote
1answer
20 views

Registry keys for automatic time and time zones

Windows 10. I would like to know the registry keys responsible for "Set time automatically" and "Set time zone automatically" in Settings > Time and Language so I can modify them using the command ...
0
votes
1answer
18 views

Is there a difference between a command line flag and a command line option?

I am hearing these two terms interchangeably and I am wondering if there is any difference between them, like flags are for one letter options or flags are after a single dash.
0
votes
0answers
11 views

zoompan filter creates shaky image?

I try to perform a basic zoompan with FFmpeg. I have an input list image (.jpg 400x300) and i create slice image video (.mp4 400*300) from it, with a zoom each image. This is my command: ffmpeg -y ...
0
votes
1answer
26 views

Windows - Run process on background after closing cmd

I have a Python script which I want to run as a background process on Windows. I can do that on Linux with: python script.py & and then disconnect the process from the terminal with: disown ...
0
votes
0answers
18 views

Doskey alias fails because of equal sign [on hold]

I am trying to make the following alias to work but it fails: doskey gittwo=git --git-dir=.gittwo I also tried it with single or double quotes but it still failed to work. alias gittwo="git ...
-1
votes
2answers
30 views

How can I re-hide previously hidden files?

Previously I used attrib -s -h -r /s /d to un-hide all hidden files in D:\. How can I re-hide the previously hidden files that are hidden by default? Most of them are desktop.ini and Thumbs.db
-2
votes
1answer
43 views

cmd: Find first letter from a string

I've no knowledge regarding cmd programming syntax. I have a text file containing user IDs which I need to delete using curl command and for that I need to extract first character of every user ID and ...
1
vote
1answer
11 views

grab history command and args for different commands

I have the following exercise: 47 vim wilson.0321 wilson.0329 I need to grab the last command and args to create: vim wilson.0329 right now I can grab the last arg or entire command: ...
1
vote
2answers
61 views
+100

Cygwin paste long line is inserting newline at wrap point

I'm having issues with Cygwin's Copy/Paste functionality on a fresh install. If I scrunch my cygwin window small, and then type a command that is wider than it is (such as echo ...
3
votes
1answer
52 views

How to set chrome as default browser Windows 10?

I've tried setting default in the reg keys hkeycu>software>microsoft>windows>shell>associations>urlassociations>http and https. Tried using master_preference file tried using command switch ...
0
votes
1answer
15 views

How to get archive in cpio format with 7zip command line

"C:\Program Files\7-zip\7z.exe" a -tcpio initrd initrdcpio\bst mods\bstnet.ko I have tried this command, but got an error
1
vote
2answers
21 views

can't run console program in batch file

I have a batch file (run.bat) which is to change my IP address setting: netsh interface ip set address "lan" static 192.168.30.77 255.255.255.0 192.168.30.2 The command worked as I expected when I ...
0
votes
0answers
18 views

Updated Drivers - Command Prompt periodic executes

Well just recently I updated my drivers a bit ago and I would rather not have to rollback my drivers, but is there anyway I can track what program or the source of this commmand prompt that keeps ...
0
votes
1answer
26 views

Is there a way to toggle the Windows “compress this drive” command through a command prompt?

My friends laptop (a 64-bit Windows 7 Home Premium with 4GB RAM) was running slowly and she asked me to take a look at it. One of the things (besides that the disks had not been defragmented for a ...
0
votes
1answer
11 views

Restart Windows Services from Linux while keeping password off the command line

I'd like to write some scripts (run on my linux computer) to help automatically restart some windows services. While I've found many answers that suggest using net rpc service, they all involve ...
-2
votes
0answers
47 views

How to uninstall an app installed with another user in Windows 10?

Yesterday I had a problem with my current user, and to solve it I had to create another user account in windows, and delete my previews account to be able to logon with my Microsoft Account in the New ...
0
votes
1answer
15 views

Create a batch file to add a beginning and end to text file lines

Can anyone show me how to create a batch file to add a beginning and end to each line of a text file? I have a large list and it would take endless time to add this to beginning and end. Even a ...
0
votes
1answer
23 views

Access denied when modifing value of registry key [run as admin & owner of key]

So i found out that i cant really modify value of the registry , whatever i do with my permissions i cant get it to work from command line (I need to do this from command line since i want to use ...
0
votes
1answer
15 views

Using the “%~dp0” with command line arguments not working

Been concocting a deployment script for a software, which needs to install Visual C++ 2013 Redistributable, in silent mode, from a moving source (aka, the folder might be on a key, on a server, ...
0
votes
1answer
39 views

copy files from directory/subdirectory listed in text file (Mac)

I'm looking to search and then copy all files with filenames matching in a text file from a directory (with subdirectories) on a server to another directory. I've found a great solution (though quite ...