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)

8
votes
2answers
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 ...
0
votes
0answers
4 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 ...
5
votes
3answers
8k 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
26 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
20 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
11 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
0answers
4 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
9 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
16 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 ...
29
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
17 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
21 views

Rename one filename by appending another filename in subfolders in windows

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
41 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
0answers
14 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 misuse term command in the rest of the message) into a file with 1252 encoding (to make it readable from ...
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
33 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
32 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
16 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 ...
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
2answers
598 views

How can I batch convert subfolders of images into single PDFs?

I'm surprised I couldn't find an easy script for this online. I have a directory with lots of subdirectories, each filled with TIFFs. How can I batch convert subfolders of multiple images (TIFFs) into ...
16
votes
5answers
57k views

How to disable the command prompt's auto-close upon completion?

I know there were some tricks with older versions of windows to accomplish this, but not sure on windows 7. If I had a piece of software that executes a command with switches resulting in a cmd.exe ...
2
votes
2answers
367 views

Working shell command doesn't alias

I can run, svn status |grep -v .jasper$ |cut -d ' ' -f8 |sed '/.*\..*/!d' |xargs ls -altr --color=auto just fine. But when I go to add this as an alias (alias svtr="...") I get an error saying... ...
1
vote
0answers
38 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
8 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 ...
1
vote
1answer
26 views

Launching the graphical interface for setting environment variables

In Windows 7, what command launches the graphical interface for setting environment variables displayed below?
1
vote
1answer
18 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
286 views

Bitsadmin Download Error

I saw a feed referring to downloading via bitsadmin (v.7.5.7601.17514) on Windows 7. I have trouble implementing this myself and continue to get errors when running the code when running from a batch ...
2
votes
1answer
2k views

How can I tell if the lock screen is active from the command line on OS X?

I have a cron script that I want to run regularly if I am logged into my Mac. I don't want it to run if the Lock Screen is up. Is there a way to check from the command line / Terminal if the Lock ...
1
vote
1answer
61 views

Is there a way to include individual file names in the master file I make in CMD line?

I have thousands of .prt files that I'm combining in CMD using: copy /b *.prt newfile.prt I'm importing those into Excel, and it works just fine, other than I would love to include the individual ...
0
votes
3answers
506 views

How to rename file using CMD “Track ?.mp3” to “T00?.mp3”

I have multiple mp3 file like this: Track [number of track].mp3 eg. Track 1.mp3 - Track 11.mp3 I want to rename them to: T00[number of track] eg. T001.mp3 - T011.mp3 I have tried to rename 1-9 ...
0
votes
1answer
90 views

Windows explorer connect to FTP through CMD

I want to connect to FTP in the Windows Explorer like: CMD> explorer ftp://example.com This works but prompts the username and password. Is there a way to automatically fill these in? I want to ...
6
votes
3answers
5k views

Flush Chrome and Firefox DNS cache from command line?

Occasionally, I need to do a scorched Earth cleansing of my local DNS cachi. The most common scenario for this was that I was using OpenDNS, and when a name would fail to resolve (it was a hostname ...
0
votes
3answers
2k views

How do i configure conemu to open a new tab instead of a new window, when run on the command line?

I use total commander a lot and in my muscle memory i have it that i can run cmd at any time in total commander, and it will open a new shell window at the current directory. I'm looking for conemu ...
0
votes
5answers
11k views

How to start “explorer” process using command line (Vista)?

Is there a way to start windows "explorer" process from command line? Because of some problem in my Vista OS, explorer process crashes frequently (i can not see TaskBar after that) but using the open ...
19
votes
9answers
65k views

Finding other computers on network over command line

I've got a handful of Macs on my home network, and shell access to only one of them from the outside. How can I figure out what IP address of the other machines are?
3
votes
2answers
6k views

Enable Remote Desktop in Windows Firewall from command line

note: #command-line tag do not imply batch-file-only, I will accept a PowerShell script or any freely available utility, which can be started from command line and finish its work unattended. tl;dr ...
1
vote
4answers
3k views

How to disable Autologon enabled by using Sysinternal's Autologon.exe?

I have enabled autologon in about 150 machines (all in domain) using batch file which uses Sysinternal's Autologon.exe and PSEXEC.exe program. Now I want to disable that in all machines. But It seems ...
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.
53
votes
17answers
218k views

Run a batch file in a completely hidden way

I'm looking for some way to run a batch file (.bat) without anything visible to the user (no window, no taskbar name, .etc..). I don't want to use some program to do that, I'm looking for something ...