Questions tagged [command-line]

An interface for interacting with a computer using typed commands in a text-oriented environment, as opposed to a graphical user interface (GUI).

Filter by
Sorted by
Tagged with
-1 votes
3 answers
4k 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....
H. aryapour's user avatar
0 votes
1 answer
412 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 ...
javad's user avatar
  • 101
-1 votes
1 answer
94 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 ...
Bigsby's user avatar
  • 67
0 votes
1 answer
2k 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, ...
Bradley Evans's user avatar
0 votes
0 answers
49 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 ...
Bluethulhu's user avatar
1 vote
1 answer
2k 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 ...
Tom's user avatar
  • 324
2 votes
1 answer
137 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 ...
Sergio's user avatar
  • 295
0 votes
0 answers
83 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 "...
Ankanna's user avatar
  • 131
1 vote
2 answers
23k 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 ...
Goose's user avatar
  • 153
0 votes
2 answers
381 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 ...
Ankanna's user avatar
  • 131
3 votes
2 answers
408 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" "...
BrianC's user avatar
  • 185
1 vote
1 answer
1k views

How to prevent ssh from interpreting remote command as a host?

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 ...
Bob's user avatar
  • 635
0 votes
2 answers
239 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 ...
Jackson Hart's user avatar
8 votes
1 answer
8k 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" ...
BrianC's user avatar
  • 185
1 vote
1 answer
65 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?
j0h's user avatar
  • 1,460
1 vote
1 answer
2k 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 ...
B Ganesh's user avatar
1 vote
1 answer
42 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\...
Cathal O Dwyer's user avatar
3 votes
0 answers
650 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 ...
Sander Smith's user avatar
2 votes
1 answer
3k 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 ...
j0h's user avatar
  • 1,460
2 votes
0 answers
118 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 ...
Jay Williams's user avatar
-1 votes
1 answer
92 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 ...
ZEE's user avatar
  • 958
1 vote
1 answer
825 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 ...
DMtd's user avatar
  • 21
3 votes
1 answer
2k 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 here ...
David Trevor's user avatar
4 votes
2 answers
7k 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" ...
liledition's user avatar
2 votes
1 answer
3k 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 ...
Orion's user avatar
  • 23
19 votes
2 answers
10k views

In Windows Explorer, why can we create a folder or file with the percent (%) symbol, if the percent symbol is used for existing variables?

Go to Windows Explorer, and create a folder/directory named %systemdrive%, %windir%, or any other existing variable. Open a command prompt, and go to the folder you just created. You can't, because ...
The Tech Guy's user avatar
0 votes
2 answers
2k 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 ...
Annoyed Windows User's user avatar
2 votes
3 answers
1k 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 ...
D4rKP01s0n's user avatar
0 votes
0 answers
569 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 ...
user avatar
1 vote
2 answers
1k 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-...
Jedi's user avatar
  • 860
2 votes
0 answers
78 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: ...
Fendec's user avatar
  • 275
3 votes
0 answers
900 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 my ...
jake_feyereisen's user avatar
1 vote
2 answers
2k 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*$",...
Deadly-Bagel's user avatar
4 votes
2 answers
2k 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:...
Fendec's user avatar
  • 275
2 votes
0 answers
206 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 ...
David Trevor's user avatar
1 vote
1 answer
1k 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 - ...
Konrad's user avatar
  • 767
0 votes
1 answer
492 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 = ...
user2284685's user avatar
3 votes
1 answer
1k 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/...
Canaryyellow's user avatar
7 votes
2 answers
23k 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, CMD ...
Bar Akiva's user avatar
  • 313
1 vote
2 answers
9k 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 "...
Nick H's user avatar
  • 13
1 vote
2 answers
3k views

Windows 10 Parental Controls

I am trying to limit an account on my computer. It is an admin account (standard account is too restrictive to be useful), not the local admin. I ran: Found a way. Just run Command Prompt as ...
Brent's user avatar
  • 13
0 votes
1 answer
206 views

How to show spaces in CMD?

So I wanted my cmd to select random sentences. set /a rnd=%random%%%5 for /f "tokens=1,2" %%a in (list.txt) do if %rnd%==%%a echo %%b Im using this but inside the list.txt file I have sentences ...
Jess's user avatar
  • 1
1 vote
1 answer
5k views

What is wrong with this Terminal command? (fusermount -u /directory)

What is wrong with this Terminal command? (fusermount -u /directory) I am trying to unmount an encfs folder but I get this error message: entry for /directory../ not found in /etc/mtab Why and how ...
Vesa's user avatar
  • 428
-1 votes
1 answer
484 views

Batch to move files from root folder into sub-folders

I have a root folder: C:\Users\username\Desktop\New folder which contains .mp3 files that are named like this: 20162406_3346_234958_97270791720411 20162305_3315_163017_97620734220699 I tried ...
Alex.T's user avatar
  • 19
3 votes
3 answers
9k views

Windows 7 command to add a leading zero to a batch of filenames

Having trouble getting the correct command syntax. We need to add a leading zero to a batch of files in a directory on a regular basis. I cannot download and install a software item to do so. The ...
Techexpressinc's user avatar
1 vote
0 answers
340 views

CoreOS HP410 RAID1 device not added (-19)

i face problem 'addition failed -19, device not added' > hpsa 0000:07:00.0: addition failed -19, device not added. > HP P410 controller SSDSmartPathCap- En- Exp=1 This hpssacli sees no ...
Viktor Login's user avatar
2 votes
2 answers
7k views

how to use space within pathname for Window's Robocopy

When my path for robocopy has a space, I surround it with " but get the weird error below... My .bat file contains: rem Backup scans ROBOCOPY "C:\Users\doug\Documents\My Scans\" "B:\BACKUP\My Scans\...
Doug Null's user avatar
  • 788
0 votes
2 answers
4k views

How can I merge video with ffmpeg

How can I get the following merged video files with ffmpeg? Please help me EDIT i Used hstack & vstack the following error 06-24 17:11:39.133 14565-14565/com.parksangha.videorecorder I/System....
Omid Naji's user avatar
3 votes
4 answers
41k views

CREATE a VPN Connection on Windows Command Line

I need to be able to CREATE a new VPN connection through the command line. I have seen things like rasdial but they are all for connecting to an existing VPN, not creating one, then joining it. The ...
Skyler Spaeth's user avatar
0 votes
1 answer
770 views

2 cmd windows flash after boot

For some reasons after the boot 2 cmd windows popped up and closed very quickly. I've managed to take a screenshot As you can see it's prompting for some access denied error regarding OneDrive even ...
keklord's user avatar
  • 305

1
111 112
113
114 115
260