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
14 views

Print a file with specified Application from mac command line

Is there a way of printing a file as if I had opened the file with a give app and pressed print in Mac from the command line, the same way I'd do this in Windows? I need it to go though the app since ...
0
votes
1answer
28 views

How to write a Bash script that accepts options?

I'm writing a Bash script to make easier to start a local webserver that I use for testing purposes; I don't need it running all the time, it is more useful to me to start it when I need it. Right ...
-1
votes
3answers
47 views

How to extract a specific line in multiple text file into a single txt file on linux?

I have 5000 txt files with the different data below that. I need a shell script to copy only line 11 (last line) of them into a single file and sort them from smallest to largest. for example: file1....
0
votes
1answer
37 views

Deterioration of Windows 7 after running the regsvr32 command

My operating system is Windows 7 Ultimate 64bit. I receive the following error message when I run InstallShield 2010: "no such interface supported" To solve the problem, I followed these ...
0
votes
1answer
16 views

KeePass kdbx not respecting -pw parameter

If I use the command line KeePass.exe {kdbx location} -pw:{password}, all that happens is KeepPass opens minimized and still asks for the password when I click on it. Even putting this in a ...
0
votes
1answer
69 views

Getting 256 colors from Cygwin within cmder/ConEmu

I am trying to get 256 colors under Cygwin while running cmder. Generally, what I am doing is opening a terminal session in Windows 10 by typing "cmd" into Start. If I need to open a Cygwin terminal, ...
0
votes
0answers
23 views

Bash - Removing all but a single number in output of command

I'm working on a script to process all images in which the standard deviation is less than a certain threshold, e.g., if overall SD is less than 50 in x image, do y to x. The command I am using to ...
1
vote
1answer
54 views

Offline Windows Install - How to view and change Pagefile settings

I'm trying to fix a broken Windows 10 installation which I can't boot into (even into Safe Mode). I have installed a fresh Windows 10 onto another hard drive. How do I view and set the page file ...
2
votes
1answer
25 views

Bash: amount of bytes used in a log file grouped by token

Assume a large log file of several GBs and several million lines where each line contains a token identifying the user account that generated the line. All tokens have the same length and can be ...
0
votes
0answers
27 views

command_not_found_handler not allowing cd command

I have the following code block in the ~/.bashrc file function command_not_found_handle { for dir in $@; do path="${path}${dir}/" done if [[ -d ${path} ]]; then echo "...
1
vote
1answer
19 views

Adding ffmpeg as environment variable

I've been trying to follow step two of the dependence guide of Microsofts Project Malmo. https://github.com/Microsoft/malmo/blob/master/doc/install_windows.md I need to create the environment ...
0
votes
2answers
56 views

What is the name of the command (function) that runs after a command has failed?

When run a command, if the command is not present, then some information regarding the failure of the command is displayed. I am trying to take the information about that failed command as input to ...
2
votes
2answers
24 views

Block-unblock or create-uncreate reg keys prevent rewriting or accidental or deliberate deletion, using the command line

I have this method to block registry keys and prevent accidental or deliberate deletion or rewriting, either by a user or by malware example of keys: "HKEY_CLASSES_ROOT\Applications\cmd.exe" "...
0
votes
0answers
18 views

How to Compare Files in HDDs

I made backup of my external HDD (I call it HDD1) on another HDD (I call it HDD2). The two HDD are the same physically, same model. My problem is that the HDD2 has less of the HDD1 file. Something was ...
1
vote
0answers
27 views

how to prevent sshd from interpreting remote command as a user

I set up a dedicated ssh key pair for the purpose of forcing a specific command on a remote server. I added the public key to the remote server authorized_keys file along with a command option ...
0
votes
2answers
31 views

Looping through subfolders to run command in many directories

I am on a Windows machine. However, I installed Cygwin and updated my environmental variable path which allows me to run Linux commands through a Windows terminal. I would like to perform the ...
4
votes
1answer
97 views

Block a registry key to prevent rewriting or deleting accidentally or intentionally using the command line

I see the post in superuser and i have a similar case, but with a small difference. I created a reg key. "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\wscript.exe" ...
0
votes
1answer
19 views

how do I reset netmon using powershell?

Im using powershell, as Administrator in windows8.1. I give the command Restart-Service netmon but it fails with no service found. ok, how do I restart netmon then?
1
vote
1answer
22 views

Extracting the index of key frames from a video using ffmpeg

Can you tell me the command for extracting the index of key frames from a video using ffmpeg in Windows. I tried ffprobe -select_streams v -show_frames \ -show_entries frame=pict_type \ -of csv ...
1
vote
1answer
19 views

CMD will not make variables equal

I am trying to make a batch script that will take the names of all sub-folders in a directory as variables for use elsewhere. The section of code that is confusing me is: for /d %%D in (C:\Users\...
0
votes
0answers
27 views

Parsing the output of Windows commands on non-English versions

For a project I'm doing I need to run some Windows commands and then parse their outputs. In particular, the commands I'm interested in are: netstat netsh ipconfig arp I've built my little system ...
1
vote
1answer
20 views

How do I capture device specific USB packets with tshark?

I have a USB instrument, and I want to capture packets on it. I ran .\tshark.exe -D and the USB interface is number 6. then I ran the command: .\tshark.exe -c 100 -i 6 it seemed to capture the USB ...
0
votes
0answers
20 views

How to install ImageOptim-CLI (Manual Installation)?

ImageOptim-CLI = batch image optimizaiton Basically, i'm an amateur on apple's script terminal. The creator of ImageOptim-CLI has been posted the installation guide. But, i still don't get it and ...
2
votes
0answers
27 views

Send commands from OSX to windows?

I would like a way for OSX machines to be able to send a command to a windows pc with a desktop shortcut. For example: CALL C:\example.bat I have managed this sending the command from a windows ...
-1
votes
1answer
29 views

CD /d <x:\folder> failing inside a .cmd script

I'm stunned with a glitch I've come across while creating some network traffic capture scripts (.cmd) Windows NT6x, Windows 7 and up (tested in Windows 7/8/10). A plain simple: CD /d x:\net\tools ...
1
vote
1answer
27 views

Multiplexing video and audio with FFMPEG from sub-directories using a Windows Batch Script

I'm trying to figure out a batch script (windows based) which will allow me to multiplex some .m2v and .wav files that exist in a load of sub-directories (within one single main directory). They need ...
2
votes
1answer
17 views

Pass errorlevel from a child batch to parent

Parent .bat @echo off SETLOCAL set errorlevel=2 start /wait child.bat echo %errorlevel% Child .bat set errorlevel=1 exit %errorlevel% Output: 2 Expected Output: 1 The answer provided ...
1
vote
2answers
40 views

Notepad++ - search for same things that are in line twice

I would like to know if there is way to search file for two things in same line. For example if I want to search line with "variable >=" and "variable >=". Problem is that I dont know what "variable" ...
0
votes
0answers
29 views

Executing unix shell scripts on a remote server using local windows command Prompt

Does anyone know, without using any third party tools, how to invoke or call a Unix shell script from window command prompt or a batch file. Any links or pointers will be really helpful. Using Batch ...
1
vote
1answer
44 views

Fast way to access screens in Linux (shell screen command)

Using the screen command under Linux is an effective way of having several "windows" to work in. One screen may be the bash shell, another mysql command line open against a database and yet another a ...
-2
votes
3answers
92 views

unlock cmd.exe, hijacked by malware [closed]

Re-edit the question Jul 5/2015: A malware (winlogon fake process) lock cmd.exe, regedit.exe, taskmgr.exe, msconfig.exe, taskkill.exe, tasklist.exe, wscript.exe, taskmgr.exe, taskmon.exe, system ...
0
votes
0answers
7 views

nodemon program won't run from command-line

I installed nodemon with npm and it was working fine, but is now inaccessible from the command-line for no apparent reason. I've tried reinstalling it globally, as here: nodemon But as you can see ...
13
votes
2answers
806 views

In Windows Explorer, why can we create a folder or file with the percent symbol, if the percent symbol is reserved for variables?

Go to Windows Explorer, and create a folder named %systemdrive%. Now, open a command prompt, and try to go to the folder you just created. You can't, because there are percent symbols in the folder ...
0
votes
2answers
34 views

Completely turn off Windows 10 from login page

As of (I believe) Windows 8, when a user "turns off" the machine it actually goes into some kind of hibernation mode to facilitate a quick boot-up. The only way I've found to actually turn off a ...
2
votes
3answers
63 views

How can I remove unnecessary text from a command line output?

I'm using GeekTool, which takes the output of terminal commands and turns them into Desktop widgets, and wanted to display the current battery percent of my bluetooth keyboard to the Desktop in the ...
0
votes
0answers
10 views

Permission denied with full permissions

I was recently working on a project and I came across a problem that I cannot figure out. Lets say that you have a directory called dir1. Inside of this directory, you have two subdirectories called ...
2
votes
2answers
42 views

Rectangular text selection in Command Prompt

From all the interpreter programs I have used, cmd.exe was unique in that it allowed you to select a rectangular block of text. Source Q1. Why did it use this method, as opposed to standard text-...
2
votes
1answer
27 views

Move all images whose names appear in a txt file to a new folder using the windows command line

I have a text file which contains the filenames of all JPEG files in a folder. I use something like this to populate the text file. dir /s /b /a-d c:\temp\*jpg > c:\temp\Images.txt Example: ...
-2
votes
0answers
20 views

How do I access Windows programs from Mobaxterm

I am trying to open gnuplot, a program I downloaded on Windows, and would like to open it from mobaxterm through command line. All help is appreciated, thank you! Grace
0
votes
0answers
29 views

How to have Windows DOSKEY alias execute another alias

I have some Windows command line aliases: DOSKEY ls=dir DOSKEY up=cd .. I know I can combine commands using $T DOSKEY lsup=dir $T cd .. But how can I create an alias to execute other aliases in ...
1
vote
2answers
46 views

Converting C# Regex To PowerShell

Our Software department has a program that runs SQL scripts from a certain folder. I now need to replicate this functionality in PowerShell. C#: var commands = Regex.Split(sqlFileText, @"^\s*GO\s*$",...
3
votes
2answers
38 views

How to download images from FTP to local folder using WinSCP command Line

I am trying to use the WinSCP command line to access an FTP Server. Then download all JPEG's in the root folder and download them to a local folder on my C: drive. Example of my script below. >"C:...
2
votes
0answers
27 views

Bat “move” fails seemingly RANDOM with access denied

My bat shall move a couple of folders, but there is one specific folder that will sometimes get moved, sometimes not for no particular reason. move "%~dp0\source" "%ALLUSERSPROFILE%\target" >NUL ...
0
votes
1answer
19 views

Equivalent of pmset noidle -u on Windows

On OS X one can easily temporarily prevent the Mac from sleeping using the command: pmset noidle -u pmset - manipulates power managment settings noidle - flag stands for sleep prevention method u -...
0
votes
1answer
35 views

How to display the Command prompt during Logon with a batch file

I have a logon script which runs the 'sc config winrm type= own' command. This command changes the registry value at this location: HKLM\SYSTEM\CurrentControlSet\services\WinRM From this Type = ...
3
votes
1answer
39 views

Bash move and rename by parsing the output of find

I have nested directories of pdf files and I would like to extract them to a higher level directory renaming them as follows: My files are something like: ./path1/pathA/fileI.pdf ./path1/pathB/...
0
votes
0answers
13 views

Windows command line - most recently modified files across entire drive [duplicate]

Is there a Windows command line command that can list (say top 100) most recently modified files, searching recursively across the entire drive? I would like to run this from the command prompt that ...
-6
votes
3answers
54 views

Linux: command line access a drive in /media without typing the ridiculously long name?

I'd like to access my secondary HD from command line, however it's named something like /media/user/5ASD5487DEFEAFE415AAEBE7892 Am I really supposed to type this? Wtf were people who make linux ...
2
votes
2answers
69 views

What parameters do I need for the “netsh int ip set dns” Windows command?

This article calls for CMD commands to fix an issue with DNS lookup. All the commands were successful up to these last two: netsh int ip set dns netsh winsock reset When I try the first command, ...
1
vote
2answers
38 views

How to append a registry key value that has spaces in it?

I found the following page (How do I modify the data of an existing registry key value name from cmd?) and it was extermely helpful, but I have a further question. My PATH has a value that includes "...