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,153 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2 votes
0 answers
1k views

Do you need to set an encryption key before using nvme-cli cryptographic erase or cryptographic sanitize?

nvme-cli has both a format and sanitize command that can be used to securely erase an NVMe SSD. Both of these commands offer a cryptographic approach, where the drive's encryption key is changed/...
Bik's user avatar
  • 35
2 votes
0 answers
585 views

Arch Linux - Archiso - Implement custom commands after installation

I'm creating a new Arch Linux-based ISO by using Archiso. My purpose is to run commands as: pacman-key --init pacman-key --populate after the installation, so, in the Live Environment, because I need ...
Develobeer's user avatar
2 votes
0 answers
783 views

Adding execution time and progress bar to the desired number of executables on Windows running via a batch script

This is a follow-up question of my previous question. Many thanks to @iTwasnTme, the following script (my_loop_exe.bat) runs desired number of executables (EXE) on my Windows 10 PC (x64, 8 CPUs). @...
timetraveller007's user avatar
2 votes
0 answers
110 views

Linux HP AIO scanner has blue tint (HPLIP, scanimage)

I have an Odroid with Ubuntu running and connected via LAN an HP LaserJet 3055 AIO. I‘ve got the printer as well as the scanner basically running. I used HPLIP and can now scan with e. g. scanimage ...
gerry's user avatar
  • 121
2 votes
1 answer
621 views

Which Linux shell command can completely remove a file from the system and make it unrecoverable?

Which Linux shell command can completely remove a file from the system and make it unrecoverable ? I have tied rm and shred but they have their limitations:- rm --help and see the information, you ...
Adarsh Goyal's user avatar
2 votes
1 answer
11k views

Firefox: how do I configure kiosk mode?

Mozilla's website states: Numerous features of the kiosk mode are configurable through policy or command line parameters when launching the browser. However, other than a single example to run kiosk ...
Jon Bentley's user avatar
2 votes
0 answers
318 views

zsh change RPROMPT time on enter

I have found resources on configuring zsh's right prompt (RPROMPT) to be the date and time and this works great. However the time the prompt renders (after the last command) and the time that I press ...
Oliver Williams's user avatar
2 votes
3 answers
4k views

Mapped network drive resets on restart

I have a problem where my mapped network drive becomes unavailable after a restart, trying various solutions to make it persistent [/persistent:yes when re-mapping via PowerShell, etc.]: net use Z: &...
Hewe's user avatar
  • 31
2 votes
1 answer
849 views

Change extension for all files in a folder & its subfolder

I am using XCOPY the following successfully copies the entire contents of \MY SKETCHES 2021 to \My Sketches (TEXT). This is my command: xcopy C:\Users\terry\Dropbox\Electronics\Arduino\SKETCHES\My ...
user263358's user avatar
2 votes
0 answers
1k views

Broken CMD, cmder, and powershell. Cmder is automatically executing commands on launch

I recently made a node.js project for the first time, and honestly I had to put my Windows 7 PC through hell trying to get it to run (more info below). However since then, my system has not been the ...
Denver Thomas's user avatar
2 votes
0 answers
3k views

Batch converting PNG images to JPG using ImageMagick's Mogrify

I need to batch convert PNG files to JPG at a quality of 90% but also keep the resolution at 72dpi. I came up with this command: mogrify -format jpg -quality 90 -density 72x72 *.png or should I use?: ...
Zoltan King's user avatar
2 votes
0 answers
6k views

How to mount network drive and make it permanent using command line in mac?

I want to mount my network drive to my local folder in mac/osx. I normally use mount_smbfs command but it won't mount automatically after restart or logout. For permanent option in mac : system ...
andio's user avatar
  • 293
2 votes
0 answers
225 views

How to change active keyboard layout (not the list of enabled layouts) via command-line on Windows?

I have a list of keyboard layouts already configured (for instance, us, dv, and ru); I switch between them with Win+Space, and the list changes occasionally. However, I have a need to switch to one of ...
JamesTheAwesomeDude's user avatar
2 votes
0 answers
616 views

Emacs load file from command line

When I was on Ubuntu, I would open files with Emacs on the command line like this: $ emacs -nw file.txt or $ emacs /etc/sysctl.conf When I use Kali and type the above, no file is opened and I am ...
DX0's user avatar
  • 21
2 votes
0 answers
818 views

Powershell can't see "git" or "node" commands while cmd can

Using Windows 10, I can't run certain commands from PowerShell but they all work correctly using cmd. PowerShell: node --version: node : The term 'node' is not recognized as the name of a cmdlet, ...
Vitaly Senko's user avatar
2 votes
2 answers
1k views

Unable to change default program to open a file from cmd

Once I thought, what can happen if I open the CPP file with cmd. I thought it will work similar to the type command in cmd, but when I understand it isn't, I wanted to change the default program from ...
RajinCoding2007's user avatar
2 votes
0 answers
127 views

How do I diagnose a slow Mac from command line? (OS X El Capitain)

I have a very old (I think circa 2009) Mac Mini, which effectively just acts as a NAS for our TimeMachine backups these days. It was working fine until about 2 days ago, when all of a sudden those ...
philolegein's user avatar
2 votes
2 answers
3k views

Why can't I run a ping command from the command prompt when not in administrator mode?

I am running Windows 10 on my PC. A couple months ago, I installed a Windows Update in the middle of the day. Prior to the update, I had been running a continuous ping from the command prompt. After ...
twelchcp's user avatar
2 votes
0 answers
2k views

Replace "cmd" to start Windows Terminal instead of cmd.exe

I am now using Windows Terminal as my main terminal on Windows. It's an awesome project. However, I still have the habit of using win+R, then "cmd", then "Enter". I'd like to ...
Johnny Prescott's user avatar
2 votes
0 answers
286 views

Access Denied for file; can't view/edit/delete file even after taking ownership

I have a set of Android Studio files that I cannot figure out how to "take" ownership of. I initially tried via the windows GUI prompt (right click -> security tab -> advanced button -&...
MisterMister's user avatar
2 votes
0 answers
1k views

Windows - how to deny permission for all users from writing into a directory

Every week, I have to take the backup of all the project files from SVN and put into my system and remove the write permission for everyone. So that it won't be changed accidentally in local system.In ...
prabhakaran's user avatar
2 votes
1 answer
206 views

Why is my cmd.exe in windows 7, opening with Administrative privileges?

Why is my cmd.exe in windows 7, opening with Administrative privileges. (I won't say Running "as Administrator" 'cos i'm aware that Win7 "Run As Administrator" option, runs it with ...
barlop's user avatar
  • 23.9k
2 votes
2 answers
93 views

Blacklist Powershell packages

Hello everyone since there is no discussion about blacklisting PowerShell packages (at least I think that there is none), I am asking you here. I asked same question on Stackoverflow but it was off ...
Silent3rror's user avatar
2 votes
0 answers
2k views

Powershell won't load fully on windows 10

Recently, I noticed a number of applications/wouldn't load anymore. Upon further investigation, I found that they all relied on a script execution or on powershell. When I try to launch powershell, it ...
am304's user avatar
  • 225
2 votes
0 answers
657 views

Open Colon delimited file from command line in Excel

I want to create a shortcut or a command to open a file that uses a colon : as a delimiter in excel. I know via the UI I can click "From Text/CSV" select a file click Import select a ...
Jim's user avatar
  • 121
2 votes
1 answer
949 views

Can't write to certain directories. It says "The system cannot find the file specified." Need help troubleshooting

Sorry if this is the wrong place to ask, but I don't know where else I should ask. (I previously asked this on StackOverflow, and was told to ask here.) On my development computer, which is Windows 10,...
Theemathas Chirananthavat's user avatar
2 votes
0 answers
1k views

SCP file transfer Connection reset after exactly 16,384 bytes

SCP file transfer from Windows 10 Command prompt to Mac Big Sur looks like it didn't transfer anything, but it is actually transferring exactly 16KB before the connection is lost (see image below). ...
matt.dolfin's user avatar
2 votes
0 answers
534 views

Zip command is killed for very large file by MacOS

I'm trying to zip a large number of very small files using zip. The resulting archive is going to be ~80GB. When I execute zip -r -0 archive.zip dir the process is killed probably due to resource ...
user106745's user avatar
2 votes
0 answers
746 views

Start Git Bash profile in Windows Terminal from bat file and pass in an executable command to run

I am trying to start 2 applications (client and server of a MERN stack app) in Git Bash using command-line arguments for Windows Terminal. Below given is my command wt -M; new-tab -p "Git Bash&...
Johnson Cherian's user avatar
2 votes
2 answers
2k views

Exclude subdirectory not working with grep command

This works for me, in that it excludes the "foo" directory from the root directory of the search: grep -rn --exclude-dir=foo 'custom' However this doesn't work: grep -rn --exclude-dir=foo/...
gornvix's user avatar
  • 145
2 votes
1 answer
2k views

WinRAR how to know immediately if a compressed file is broken or incompletely downloaded by command line

I have WinRAR and using Windows 7 OS. It shows errors immediately like "Cannot open < FileName >" for the files which downloaded incompletely or broken when we open. But when I search ...
Dhay's user avatar
  • 133
2 votes
2 answers
119 views

How to make VLC actually remember what I tell it?

I keep being forced to select "Always on top" in the "View" menu in VLC. It forgets this setting the moment I close VLC. And then I have to repeat it again and again and again... I ...
Alandus V.'s user avatar
2 votes
0 answers
76 views

How to convert multiple GIFs into one PDF on OSX?

I found the following code to do it with one GIF: sips -s format pdf cat.gif --out 'cat.pdf' I understand that I can use for and do it for multiple files. But I will get multiple PDFs in result, but ...
LA_'s user avatar
  • 626
2 votes
1 answer
2k views

Windows: How to cleanly stop tor process from the command line?

From time to time I need to stop tor.exe (Tor) using the command line while it is running on the background. So far I have tried the following: C:\Path\to\tor.exe -system stop, which doesn't work C:\...
Phineas's user avatar
  • 501
2 votes
1 answer
646 views

Windows 10: Change account type without signing out?

I am trying to write a script to automatically change my account type every week for a few hours. I know this can be done via the following, however I want to finalize the change without having to ...
Teererai Marange's user avatar
2 votes
0 answers
60 views

Can Visual Studio print a colorized C++ file from the command line?

I teach and I often have a large number of C++ source files from students that I'd like to pretty-print for grading as PDFs using Visual Studio's formatting and syntax coloring.  I know how to do ...
Nicole Hamilton's user avatar
2 votes
2 answers
5k views

Connecting/Disconnecting to Bluetooth Device via CMD, PS, or AHK?

I'm at my wits' end right now. I'm on the latest version of Windows 10 and I just want to run a script to connect/disconnect to my Bluetooth headphones when executed. I've looked at a couple other ...
OskeeHelpMe's user avatar
2 votes
0 answers
389 views

accesstime on macOS Catalina 10.15

Suppose you own a file system on a unix machine, and you would like to know which of the regular files on this system you have accessed within some interval. ("Regular file" means it is not ...
Jacob Wegelin's user avatar
2 votes
0 answers
564 views

PowerShell Q: Why this foreach-object change the value on both variables ? I want to change only to one ( $b )

As you see in this image or code, the foreach-object cmdlet change the value in both variables, but I want only change it on the second one, $b. It's a extract of the terminal itself: PS C:\> $a ...
Ricardo Gisinger's user avatar
2 votes
3 answers
567 views

Delete every subfolder in a directory that doesn't contain certain extensions

Question: Is it possible to delete every folder in a certain directory that does not contain specific file types for example music files (mp3/flac/wav/etc)? I've retagged some files using Mp3Tag ...
Josh's user avatar
  • 41
2 votes
0 answers
801 views

How do I Query User-Session Info and Pass in User Credentials for RDP Shadowing on Windows 10?

I'm trying to shadow my work desktop from my home desktop using RDP. My home desktop is running Windows 10 Home, and my work desktop is running Windows 10 Enterprise. Most of the articles I've found ...
Rvby1's user avatar
  • 71
2 votes
0 answers
558 views

Make readline edit input command in external editor (similar behavior as "edit-and-execute-command" from bash)

Background So far I've found readline very useful since just by modifying a single configuration file (i.e. ~/.inputrc), you are configuring all those programs that depends on readline. The programs ...
gfe's user avatar
  • 177
2 votes
0 answers
198 views

Python and Perl not recognized in cmd even after adding in environment

It was fine yesterday, but it suddenly stopped working today. Both my perl and python were not recognized in cmd. I read as much as i can online for the answers and follow the instruction. I have ...
niknur's user avatar
  • 21
2 votes
1 answer
1k views

How to use Firefox command line to download a specific image from a website?

Server: ubuntu 18.04 I intend to automate extracting a skychart from HevenAbove website. Now I can use the following command to download the whole page. firefox -screenshot heavenabove.png 'https://...
bthoven's user avatar
  • 21
2 votes
0 answers
49 views

Copy symbolic link and its target subdir to new dir

I have a dir with a symbolic-linked subdirectory: greg:/testA> ls foo -> alice alice/ I need to copy the link "foo-> alice" (preserve it at destination) AND the subdirectory alice/ to a new ...
G. D'Seas's user avatar
2 votes
1 answer
2k views

How to create custom Global System-wide variables like $Home in Powershell and assign persistent value to it?

I am just starting to learn Powershell and already one thing started bugging me. The undesirably & unfairly confusing discrimination between $env:Home and $HOME. Where $HOME can be autocompleted ...
Vicky Dev's user avatar
  • 452
2 votes
0 answers
2k views

Extremely slow download speed in Windows command prompt

I usually use Ubuntu but currently, I am trying to setup Jupyter notebook and PyTorch on Windows. The problem is that while downloading various packages, the download speed is extremely slow (seen ...
Sunit Gautam's user avatar
2 votes
1 answer
426 views

DOSKEY doesn't work in succession

If I define a command as such: DOSKEY say=echo $* And then run it like this: say hello&&say goodbye The output is: hello 'say' is not recognized as an internal or external command, ...
user1122946's user avatar
2 votes
0 answers
1k views

Disable playback/recording device programmatically (cmd, c#) Windows

I am trying to disable the microphone from cmd or c#. I tried to use devcon.exe, but it disables the device in Device Manager but not in the sound properties. I tried to write to the registry: reg ...
Chris's user avatar
  • 141
2 votes
0 answers
2k views

How do I automatically print image files into pdf files using windows command lines

Edit: It seems my friend can install IrfanView if that helps. I'm helping a friend to automate the task of printing every single image file in a folder into multiple PDFs: Each image goes to a ...
Miguel P's user avatar

1
3 4
5
6 7
64