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).

3,154 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
11 votes
2 answers
1k views

How can I cancel reverse search without losing text typed?

When using reverse-search (Ctrl-R) in the bash terminal , I can cancel the search using either Ctrl-C or Ctrl-G. Both these options will clear the text typed while searching. However, the most common ...
Silveri's user avatar
  • 2,877
9 votes
0 answers
2k views

How do I install Nix on a custom directory?

I have been trying to follow the Nix wiki to install Nix on a custom path /scratch/gopinath/nix. The /nix path is not accessible to me due to the restrictions on the system provided by my university. ...
Rahul Gopinath's user avatar
8 votes
0 answers
1k views

How to make robocopy delete excluded files in destination directory

I have a cross-platform build toolchain which copies some folders to destination. I use robocopy on Windows and rsync on macOS because they support console progress output. The commands were in this ...
dmitry1100's user avatar
8 votes
1 answer
5k views

Stopping a scheduled task with a batch file action doesn't stop the program running in the batch file

I have several scheduled tasks that each execute a (different) batch file. Each batch file calls into the same program, with with separate command line arguments. If I Stop a task while it's running, ...
Christopher Stevenson's user avatar
8 votes
1 answer
2k views

Unintentional vi mode in iTerm on Mac?

I occasionally find that while working in iTerm the default Readline key bindings are replaced with the vi keybindings. For example, I will try to go to the beginning of the line with ctrl-a, and ...
Vyas's user avatar
  • 181
8 votes
0 answers
1k views

VBoxManage: error: Cannot read the partition information from '/dev/disk0'

I'm trying to make a partition .vmdk file for Virtual Box. Basically I want to boot my bootcamp partition box up in Virtual Box. But I get the following error when I try to make the .vmdk file ...
DonyorM's user avatar
  • 181
8 votes
1 answer
7k views

How to quickly & easily toggle touchpad on and off on a windows 10 laptop?

I am wondering if there's a way to easily toggle the touch-pad on and off on a windows 10 computer that doesn't have a location on that can be tapped to do that action (upper left corner of the touch ...
RetroCUBE's user avatar
  • 133
7 votes
0 answers
2k views

Stopping creation of .localized files

Some folders on my new Mac has .localized files in them. I know they are related to localization (duh), but I don't need that, in fact I specifically want everything file system related to be ...
Klas Mellbourn's user avatar
7 votes
1 answer
4k views

How to copy unsupported data streams with ffmpeg?

Briefing I have some .wmv files (actually, my full batch file deals with multiple filetypes) with weird data streams that are needed for an external program to recognize them. I'm trying to remove ...
Fabio Freitas's user avatar
7 votes
1 answer
3k views

Get current working directory of another process

I have a PID, and I am trying to determine what the current working directory of the process is. I played around with wmic process for a while, but it doesn't seem to have the cwd available. Anyone ...
kbjr's user avatar
  • 169
7 votes
2 answers
28k views

Why my command prompt is not recognizing 'netstat' as a command

I want to figure out my running ports in Windows 10, but when I write command C:\> netstat in the console, I get the following error 'netstat' is not recognized as an internal or external ...
Ameen's user avatar
  • 77
6 votes
0 answers
9k views

What’s the command line equivalent of strace on Windows?

I need to | findstr SomePATH in order to search if a program access and close immediately a specific path. On Linux, I would use myprogram | strace 2>&1 | grep SomPATH. But what’s the ...
user2284570's user avatar
  • 1,843
6 votes
1 answer
4k views

Ignore certain changes in git diff

Is it possible to get a report from git diff or related commands that excludes a certain category of change? I've been asked to review a change where a huge number of files have undergone the ...
jsharp's user avatar
  • 161
6 votes
2 answers
3k views

How to NOT Terminate Batch Job

in my power shell command prompt when I run a command and pressing ctrl + c a message appears asking for Terminate batch job (Y/N)? no matter if I enter Y, or N or n, it terminates the job. My ...
Reza's user avatar
  • 732
6 votes
2 answers
3k views

Create an alias to a samba share from the command line

I'm currently wanting to deploy a setup to around 300 Macs. I have all of it scripted and ready to deploy, excepting that I'm having trouble creating a working alias to a samba share from the command ...
Matthieu Cartier's user avatar
5 votes
0 answers
1k views

How to change windows settings programmatically?

The following are the categories of settings in windows: Each has their own set of sub settings (sometimes nested too), as shown in the following picture: Whenever I format my computer I change a ...
YozNacks's user avatar
  • 151
5 votes
0 answers
480 views

Google Chrome - Open Tab and add to group - commandline

Is there a way to launch a new tab in Chrome and have it added to a specified tab group from the command line? Thanks
IonutN's user avatar
  • 51
5 votes
2 answers
7k views

Is there any way to turn off tamper protection using command line?

I work with many test PCs, so I want to automate the procedure for installing OS and setting up. Disabling anti-virus is one of the set-up steps via the below, with it working well for a while, but ...
Taewoong.Kim's user avatar
5 votes
1 answer
3k views

How To Stop Cmd Window From Scrolling Down Automatically

I'm making a batch file that runs some ffmpeg commands. When ffmpeg is encoding, it shows you the progress of the encode, updating it every second or so. The problem is that sometimes I want to ...
Supercreature's user avatar
5 votes
0 answers
624 views

How I get my command prompt to show just the name of the folder I'm in (not the whole path))

In a command prompt window (terminal), how can I get my prompt to be just the current folder? e.g. prompt $p $g gives: C:\Users\Robin > But I want it to just show: Robin > UPDATE: As @...
ro͢binmckenzie's user avatar
5 votes
1 answer
2k views

Access key pairs in a macOS keychain from the commandline

I created a key pair in like this: security create-keypair -a dsa -s 4096 FooBar Now I want to access this key from to the command line to actually use it (in .pem format if possible). However, ...
mkeiser's user avatar
  • 151
5 votes
1 answer
1k views

How to install greasemonkey user scripts into Firefox by UNIX command line

I want to avoid manually navigating using Firefox browser in order to add a Greasemonkey userscript by navigating to that script on a website. That is very cumbersome if I want to add a bunch of new ...
bgoodr's user avatar
  • 641
5 votes
1 answer
2k views

How to get uncompressed content when using recursive wget?

i am downloading many single pages with all static content (js, css, imgs...) via wget recursive. It showed up, that served content, which was compressed (gzip), is stored by wget in compressed form. ...
user3720773's user avatar
5 votes
0 answers
495 views

How to access KDE's camera:/ from terminal?

KDE's device notifier detects my GoPro Hero camera correctly and allows me to access its contents in dolphin through the URI camera:/. Is there a way to access the camera also from the command line? ...
Lars's user avatar
  • 243
5 votes
2 answers
863 views

Ruby commands are turning off tty echo

After running Ruby scripts, almost 100% of the time, the bash command line will appear to be inactive, while in fact it's silently accepting my keystrokes without showing them to me. This has ...
Paul Roub's user avatar
  • 277
5 votes
0 answers
2k views

How to properly concaternate two audio files together?

I ripped two Blu-rays and I'm trying to combine the audio from both into one file. I've decoded it from DTS-HD MA to Wave64, and I used avisynth to remove the black screen audio (4 seconds) from the ...
MarcusJ's user avatar
  • 2,135
5 votes
2 answers
922 views

Shell commands as background image

In many terminals and terminal emulators, it is possible to specify a background image. I've seen some setups where-in this background image was even dynamic. Is it possible to watch a preset command ...
Zolvaring's user avatar
5 votes
1 answer
642 views

Command prompt uses 4x6 font for non-1 sessions, 8x12 unavailable

I have a proble with Windows 8. If the current user session isn’t the first session started after a cold boot (basically meaning a restart in Windows 8), the console windows use very tiny 4x6 terminal ...
kinokijuf's user avatar
  • 8,255
5 votes
1 answer
6k views

How to add files to specified folder in archive with 7zip command line

I have folders and files on my disk C:\builds\main.exe D:\components\a\testa.exe D:\components\b\testb.exe D:\components\c\testc.exe D:\dependencies\abc.dll Can I create an archive with 7z command ...
Peter PAD's user avatar
  • 149
5 votes
1 answer
8k views

Command to see what version of HDMI

Is there a windows command to determine which version of HDMI specification is available/implemented on a given video adapter or other HDMI information? Software utilities are also welcome. Similar ...
Moab's user avatar
  • 58.3k
4 votes
0 answers
228 views

Console program randomly freezes

On my Windows10 laptop, I run a simple USB camera snapshot program, commandcam.exe (from https://batchloaf.wordpress.com/commandcam/), in a console .cmd script, which has one line: FOR /l %%i in (1,1,...
yong321's user avatar
  • 141
4 votes
1 answer
542 views

How can I open a file in drawboard pdf via command line? (Windows Store App)

Usually you can open a file with an app by passing the file as the first command line argument programe.exe file.pdf For Apps from the Windows Store it seems like you have to use a different method. ...
someonr's user avatar
  • 141
4 votes
0 answers
560 views

Windows 10's SSH Client can't paste tilde and backtick

I'd like to use Windows 10's SSH Client so I don't have to install other programs to ssh but it is impossible for me to paste the tilde character (~) and the backtick (`), they are just ignored. By ...
Christian Toffolo's user avatar
4 votes
2 answers
913 views

PATHEXT environment variable not working

I want to use gcc on Windows, so someone gave me a MinGW folder. I put the D:\software\MinGW\bin\ folder in my PATH. But when I open a new CMD and type gcc, I get 'gcc' is not recognized as an ...
JacopoStanchi's user avatar
4 votes
0 answers
1k views

Delay in starting command prompt

There is a weird problem with my command prompt. Whenever I start it, there's a delay. The windows opens quickly as it should, but there is a Blank Time, before the command line displays this message: ...
batchcoding____s's user avatar
4 votes
1 answer
396 views

Performing network connection "diagnose" / "troubleshoot" via command line in Windows

Is there a way in command line to do the steps that Windows 10 does when you right click a network connection and choose "diagnose" or when you tell it to troubleshoot a connection? I'm ...
g491's user avatar
  • 504
4 votes
0 answers
665 views

Opening URL in specified Firefox profile from command line

Is there a way how I can let Firefox open a link in new tab from command line for specified profile? Ideally in a way in which it doesn't matter, whether Firefox is already running or not I know I can ...
Jaymes's user avatar
  • 41
4 votes
0 answers
14k views

Installing fonts with PowerShell commands in all users in windows 10

I want to make an unattended Windows 10 x64 LTSC (1809). I've installed a number of fonts with Powershell via the Powershell script in the following repository: here That worked fine, but that work ...
Mehdi's user avatar
  • 51
4 votes
0 answers
9k views

losetup does not find first unused loop device and fails to list busy devices

$ sudo losetup -f ~/vhost/.test_04 was hanging (sat for an hour without finding the next available loop.) So I checked by hand $ sudo losetup -f /dev/loop1 That looked to be functioning as expected,...
Alexx Roche's user avatar
4 votes
1 answer
614 views

Console as desktop background in Windows 10 / Server 2016

I want to replace the default image/slideshow desktop background with a usable console (cmd, powershell, whatever). This console should behave the same as a normal desktop background, i.e. it should ...
And G's user avatar
  • 139
4 votes
0 answers
697 views

Cannot zip a mutli-part archive, zip -FF command failing with out of memory error

Command zip -FF xxx.zip --out final_xxx.zip Fails with zip error out of memory or zip error : cannot split, read, write, file is too big.may be result of bad comrpression , try -fz I do not how try ...
Sanchit Sharma's user avatar
4 votes
0 answers
2k views

How to automount an ext filesystem in macOS

TL;DR This question is about auto mounting partitions with file systems non native to macOS. I'm presently running macOS 10.12.x and I can successfully mount an external SATA disk formatted with an ...
ipatch's user avatar
  • 259
4 votes
0 answers
2k views

Create a symbolic link to a named pipe

Let's say some application exposes a named pipe with the name "Pipe1". If I want to express the named pipe as a file path that can be used for writing or reading, the path \\.\pipe\Pipe1 or \\?\pipe\...
IS4's user avatar
  • 1,450
4 votes
0 answers
5k views

curl (and openssl) two way authentication always fails

Problem I'm trying to use curl to send a POST request to a web service deployed on tomcat with host and client verification is required (two way authentication) but I always get the response 404 Not ...
joker's user avatar
  • 235
4 votes
1 answer
3k views

Output of nettop command

I want to calculate net transfer of bytes(in & out) for every 2 seconds. I'm using nettop to know the usage(bytes_in and bytes_out). Command: nettop -x -k state -k interface -k rx_dupe -k ...
SkrewEverything's user avatar
4 votes
0 answers
613 views

How to enable Mobile hotspot (from Anniversary Update) in command line

I want to enable new Mobile hotspot from Aniversary Update in command line same way as from the Window's Settings. I know that there is NETSH WLAN start hostednetwork but this command doesn't enable ...
maresmar's user avatar
  • 141
4 votes
1 answer
11k views

Batch execution error "not recognised as an internal or external command"

D:\temp\copyTXT.bat is a simple script containing: XCOPY /v D:\temp\MyFile.txt D:\Documents\ Executing the script fails, flashing a window for ~100ms, then does nothing (no copy at all), but if I ...
Fred Cailloux's user avatar
4 votes
0 answers
1k views

How to remove obsolete account from TFS

I'm the TFS 2012 admin, I use cmd "TFSConfig identities" to found lots of obsoleted accounts, but I get stuck at removing these accounts. Methods I used : CMD: tfsconfig accounts /delete account: ...
Mac Lee's user avatar
  • 141
4 votes
2 answers
3k views

Why does echo not change the %ERRORLEVEL%?

The %ERRORLEVEL% contains the status code of the previously run command. If the command completed successfully the code will be 0, otherwise it will be something else. So then consider the following: ...
David says Reinstate Monica's user avatar
4 votes
0 answers
756 views

"Filename or extension too long" for move, but it isn't

I'd appreciate some insight as this is driving me nuts. I have a folder on a network share: \\host.example.com\Share\Path\Container1\Folder I am trying to move that folder to a new location on the ...
Babszem's user avatar
  • 41

1
2 3 4 5
64