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
2answers
3k views

What does mkdir -p create as the parent directory or way to see its effect?

I read from http://www.techonthenet.com/unix/basic/mkdir.php that the mkdir command "creates a single directories or multiple directories." and with option -p "If the parent directories don't exist, ...
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
16 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
1answer
32 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
0answers
18 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 ...
0
votes
1answer
19 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
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 ...
16
votes
1answer
9k views

How do you configure ConEmu to run cmd.exe as an Administrator from an Explorer integration?

I am trying to add a ConEmu Here - Explorer context menu integration entry for the Visual Studio 2012 command prompt. I want the shortcut to Run as Administrator. I am not sure of the right 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
2answers
57 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 ...
0
votes
0answers
23 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.
1
vote
1answer
17 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
3k views

How to install GRUB command-line tools on OSX?

I need access to grub-mkrescue for a project I'm working on. I know that the GRUB command-line tools come builtin to Linux, but how do I get them on OSX? Is there a package? Is it built into the ...
0
votes
1answer
23 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 ...
34
votes
5answers
55k views

How to set an alias in Windows Command Line?

I used to work on bash and benefit a lot from alias. Is there any equivalent way in Windows Command Line? I don't want to simulate a Linux environment, so cygwin is not a choice. I just need some ...
5
votes
2answers
99 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
4answers
4k views

Unzipping files using winzip in command prompt

I am trying to unzip the files from an archive called wz_test at the command prompt, using the following command: wzunzip -d c:\wz_test.zip c:\new I am not able to unzip because it's saying that ...
41
votes
14answers
41k views

Is there a way to display a countdown or stopwatch timer in a terminal?

How can I display a real-time countdown timer on the Linux terminal? Is there an existing app or, even better, a one liner to do this?
5
votes
7answers
26k views

How can I use Tab-Completion in PuTTY connecting to a Ubuntu Server?

I use PuTTY to connect to an Ubuntu Server (VPS). I would like to use Tab-Completion when I'm working with the command line on Ubuntu Server... How can I configure it?
0
votes
1answer
3k views

Adding many IP addresses to Windows Firewall using CLI fails partially

I have a PowerShell script which adds IP addresses to Windows Firewall using the "netsh advfirewall" command. (As described in this question: How to append netsh firewall rules, not just replace). ...
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
1answer
4k views

Rename a Mapped Network Drive via CMD

I map a network drive via command line. Once this drive is mapped, it appears under My Computer with the full path. How can I rename the mapped drive using command prompt? I have used the "full ...
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
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 ...
8
votes
1answer
9k views

sudo chown fails with operation not permitted

I have found similar questions here, but the answers provided to those questions do not resolve my problem. If I do: sudo chown <username> main.m I get an operation not permitted error. ...
1
vote
4answers
3k views

Linux Mint “PPA does not support trusty”

ta to the repostitories list in Linux Mint 17.3 but cannot seem to get it to add! I get the error: 'This PPA does not support trusty' Cannot add PPA: ''This PPA does not support trusty' I have ...
5
votes
3answers
9k views

Restart Ubuntu sound processes via command line

I tried to hibernate Ubuntu (which fails, but thats another issue) and resumed my system. After this, the sound doesn't get played. What command can/should I run to restart the ubuntu sound system.
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 ...
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
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 ...
30
votes
7answers
143k views

Commmand line command to copy entire directory (including directory folder) to another directory

using the command line, I'd like to copy one directory to another. For example there is directory C:/test and C:/test2. I'd like to copy C:/test into C:/test2 so that the result will be C:/test2/test ...
5
votes
3answers
18k views

How can I execute a .bat file as Administrator on startup?

We want to autorun d:\func.bat when we log in to Windows 8. We have added test.cmd to C:\Users\<User Profile>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup. When we reboot or ...
-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
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 ...
-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 ...
-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 ...
41
votes
5answers
26k views

How do I execute multiple commands when using find?

I'm trying to run multiple commands on things I have found, how can I achieve this? find . -exec cmd1; cmd2 does not seem to work; it instead runs cmd2 after cmd1 has been executed on every file.
0
votes
2answers
160 views

Suppress output of nslookup command in batch file

Trying to cleanup my batch file... Having problems with the following command still printing out some info: FOR /F "tokens=2" %%a in ('nslookup myip.opendns.com resolver1.opendns.com') do (set ...
0
votes
0answers
36 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 ...
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
17 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 ...
24
votes
6answers
16k views

How can I change all files belonging to one user to another user?

I'm looking for a Linux command that can change ownership of all files belonging to a given user, preferably in a targeted directory, to another specified user. My dream command would look something ...
0
votes
1answer
113 views

how to use Null is Batch script

I working on small program to update the configuration of small program, I'm new to batch script, user need to enter desired input to go to desired program and I have 5 set of programs with in the ...
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 ?
3
votes
1answer
4k views

Checking Firefox version using cmd returns an error

On checking the version of Firefox using firefox -v, I get the following error. (process:12746): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed Mozilla Firefox 31.0 I ...
3
votes
3answers
9k views

Disable MsMpSvc from command line

Quite simply I'm looking for a way to disable Microsoft's security essentials service from the command line, you used to be able to run the command (as admin) net stop MsMpSvc but that was somehow ...
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: ...
5
votes
4answers
24k views

bat file to disable ethernet adaptor and then reenable it after windows log in

When I log into Windows 7 I need to wait 10 seconds and then disable the Local Area Connection (ethernet adaptor) and then reenable it. I have looked through the suggested answer: Enable/disable ...