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 vote
0 answers
10 views

Can't figure out how to add padding to left side of Ubuntu 20.04.5 CLI in WSL 2(On Win11)

Posting here with updated detail after posting on AskUbuntu as user @NotTheDr01ds had a great answer but unfortunately it did not accomplish what I was hoping to accomplish. I installed WSL 2 and ...
  • 111
0 votes
0 answers
34 views

Is there a cmd command to unblock apps that are blocked by organization administrator? [closed]

I want to unblock all apps that are blocked by administrator in python. The apps blocked are things like virus protection and threat, UAC, regedit, notifications, firewall etc. I want to unblock these ...
0 votes
0 answers
18 views

How to launch Edge browser with command line flags?

My question is similar to this: Applying a command-line flag to Chrome at auto-launch But 7 years later, on Edge browser, on Windows 11. I knew a way that'd make it possible to add flags to Edge ...
0 votes
1 answer
20 views

How do I open the WSL CLI on Windows 10?

How do I open the WSL CLI on Windows 10? I installed WSL on my Windows 10 system, but I have no idea how to access the WSL CLI. All the tutorials on the internet assume that the CLI is already open.
0 votes
1 answer
42 views

Access denied when adding key to HKEY_LOCAL_MACHINE using bat file, adding to HKEY_CURRENT_USER works fine

I need to add a new registry key to the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsRunTime\AllowedCOMCLSIDs. I tried running a following bat script: @echo off REG ADD "HKEY_LOCAL_MACHINE\...
0 votes
0 answers
19 views

Running batch file is somehow running executables from a previous batch file?

This is one of the weirdest issues I have seen in Windows. It seems that killing explorer.exe is causing the problem. The quick version of the problem is: It seems like Windows is confusing a ...
  • 407
1 vote
1 answer
20 views

Find files containing a string and execute command

How do I find files that contain a specific string and execute a command on these files? In my case, I'd like to find all *.md files that contain the string ^ - HIMS$ and stage them with git. I know ...
0 votes
1 answer
29 views

Why do environment variables only expand to a certain level of nesting?

I found some confusing behavior in working with environment variables. If I have two environment variables and one points to another, when I reference the pointer variable, it will be automatically ...
  • 1,355
0 votes
1 answer
25 views

Command line runas to really, really run as administrator [duplicate]

I am logged on as user and want to "runas" to run some command script as administrator. This does not work: ">runas /user:administrator mybatch.cmd" : mybatch.cmd executes but ...
0 votes
0 answers
13 views

Windows tool, preferably CLI, to determine how long a window has been in focus? [closed]

I know you can get process run time, like in this question, but is there a way to tell how long a particular window has been in focus? (Actively used)
  • 1,958
0 votes
0 answers
15 views

File auditing in macOS - check which process deleted a folder/file

After macOS minor upgrade of Monterey I've noticed that a directory of mine has been deleted. is there a way to check in retrospect which process deleted my directory ? I know of fs_usage, but it's ...
  • 153
0 votes
0 answers
12 views

OCRmyPDF cannot convert pages with watermarks

I have some scanned magazines with a pink watermark on some of the pages. I need to ocr them and OCRmyPDF seems to be the right tool for the job. Except that it cannot convert text on top of the ...
  • 529
0 votes
1 answer
16 views

Easily disabling and enabling a monitor in a multimonitor setup

I have 2 external monitors, and 2 laptops, one work one personal. I switch the primary monitor between my work laptop(usb-c) and personal laptop(hdmi) through the monitor menu. When I'm on my work ...
  • 101
-4 votes
0 answers
33 views

MS_Dos - BSoD Prank [closed]

I'm playing a prank with the MS_Dos emulator but I need to cause a BSOD does anyone know how to help? Thanks, The JKID_Tech team
1 vote
1 answer
30 views

How to send post request to a discord webhook via CMD

I have been trying to send post requests to a discord webhook for around an hour now but can't seem to figure out how to do it. I want to send this: { "content": null, "...
0 votes
1 answer
43 views

rundll32.exe powrprof.dll,SetSuspendState 0,1,0 does nothing

Originally, my question began a little differently: When I am using BigBox (Launchbox), I choose the "Sleep" option, and it kept putting my laptop to hibernate. I could not wake the machine ...
  • 101
0 votes
0 answers
9 views

Is there any way to filter and sort emails into folders on the commandline for use with neomutt + mbsync?

I've recently transitioned to using neomutt and mbsync for my personal email (setup via mutt-wizard). I'd like to do the same for my work email, but I get a significant volume of email on that address....
5 votes
1 answer
612 views

sending print string command to remote machine

I'd like to print some string to all open terminals processes that are running in remote machine. currently I'm using ssh to connect the remote machine, and than I echo my string into wall command : ...
  • 153
2 votes
1 answer
30 views

Changing output file name in a batch file

Sorry, the title isn't very descriptive, but I couldn't think of a better one. I use this script to drag and drop video + audio file, and combine them with ffmpeg. ffmpeg -i "%~1" -i "%~...
  • 57
0 votes
0 answers
24 views

Transmission-cli on Ubuntu: properly setup or run in background to download multiple torrents?

I recently started using transmission-cli on Ubuntu 20.04 to download torrents in the background. I only need CLI, no web interface or remote control. So I did sudo apt install transmission-cli, upon ...
1 vote
1 answer
32 views

Is there a way to choose between single-thread and multi-thread compression in 7z command line tool?

Is there a way to choose between single-thread and multi-thread compression in 7z command line tool? I want to be able to make the choice so that a process that's meant to run in the background with a ...
  • 492
0 votes
0 answers
37 views

Extract files in order by numbers at end of filename (windows)

I want to use a Windows .bat file to extract a number of files in a folder. I have files with numbers at the end of filename, just before the extension, and I need to extract them in order of these ...
0 votes
0 answers
24 views

Ubuntu 22 - zsh: command not found: lessc

OS: Ubuntu 22.04.1 LTS zsh 5.8.1 (x86_64-ubuntu-linux-gnu) Before installing oh-my-zsh everything worked, now I have issues. One of the issues is zsh: command not found: lessc, but who knows how many ...
1 vote
1 answer
39 views

Redirecting the output to a file and command prompt simultaneously

Below code is in batch file as i'm running powershell script with batch file. but doesn't give any output. I am trying to use the tee code written for a bat file but am having trouble implementing it ...
0 votes
1 answer
18 views

Windows equivalent of Linux fallocate cmdline tool

Is there a (free) Windows commandline program to allocate (that is, reserve) arbitrary space in a NTFS filesystem to an arbitrary filename without actually writing to that space ?
  • 479
1 vote
1 answer
46 views

After Windows 11 22H2 update, wsl command stopped working from PowerShell, still available from cmd.exe

Just after the 22H2 update, I opened up WSL to set up a @reboot cron task in my Ubuntu environment. WSL opened without any problems. I wanted to reboot WSL from PowerShell to make sure my crontab ...
  • 111
0 votes
0 answers
24 views

How to pipe a user input after a command

I'm trying to automatize the call of the library ADB to connect to android. The command pair ask to user for a code, so I was thinking if there is a way to do all in the same call. C:\Android\sdk\...
0 votes
0 answers
7 views

Can I provide CLI options to a running Thunderbird Portable?

When I use an installed Thunderbird, I can give it CLI parameters for composing a new message. thunderbird.exe -compose "to=bowi@bowiiscool.com,subject=This is my subject,body=Hello" ...
  • 1,303
1 vote
0 answers
27 views

runing a programm offline [closed]

Is there a way to run a programm offline on linux ? I recently discovered that a program I'm using is sending a lot of undesired packets on the network. I still want to use this programm but I want to ...
  • 11
0 votes
2 answers
34 views

How to deny all permissions except read & execute to a folder for a user, using 'icacls' command?

We would like to change the permission of the folder which currently has full permission to a user with the parent inheritance with the full permission. I would like to apply 'Deny' permission to the ...
0 votes
1 answer
14 views

Disabled driver installations through GP then removed a device

I have one laptop with faulty keyboard (stuck keys which occasionally write stuff on their own) and I Googled "how to turn keyboard off" ... found a way which includes Enabling ‘Prevent ...
  • 21
0 votes
0 answers
23 views

Globally store all command line / bash / windows terminal input and output into text log files

I am looking for a global and automated way to always log all the input and output of all of the command line windows I am using into text files. I am using 3 types of console on Win 10 - git-bash.exe,...
  • 143
0 votes
3 answers
25 views

Select program from PATH hidden behind program of the same name in powershell

Given two homonymous programs in my PATH, how do I execute the second one? I. e. how do I execute the below tar from scoop instead of the Windows tar: PS D:\mdn\kapeli> where.exe tar C:\Windows\...
  • 113
0 votes
1 answer
36 views

Pipe output from script as argument into next command

I'm trying to get information from a perl script piped to the next command to use in a docker script (so it needs to execute in a single pipeline). For some reason, the stdout from the command is not ...
  • 103
0 votes
0 answers
12 views

Command prompt - expand maximum width so it spans across two monitors

I have 2 monitors and am using Command prompt to view PostgreSQL entries (from a Linux computer, viewing remotely via ssh). Unfortunately, I can only enlarge the window to the max width of my primary ...
0 votes
0 answers
14 views

Cut and concatenate in one command [duplicate]

Is the following possible with ffmpeg? I have one source video file of a length of many hours and want to concatenate small sections of this large video to a small video. Let's make an example: part1:...
0 votes
0 answers
48 views

Starting a steam game remotely using powershell

I am trying to start Space Engineers using this command saved in a .ps1 file: Start-Process -WorkingDirectory "C:\Program Files (x86)\Steam\steamapps\common\SpaceEngineers\Bin64\" -FilePath &...
  • 101
0 votes
1 answer
25 views

Get output logs of previous command in ZSH

I'm working on a helper script that needs to run after every command to analyze its exit status and output logs. I understand that stdout/stderr buffers are not stored on pseudo terminals. I therefore ...
2 votes
1 answer
36 views

PowerShell script to automatically adjust system date/time

I'm looking for something very specific. I've been searching it for weeks on and off whenever I have the time and now I just few like I'm wasting time because I can't find anything, so I guess the ...
0 votes
0 answers
15 views

Autostart programs doesn't have a window/ GUI

So, I have a cmd window that I need to run even if no user is logged in. For that, I created a script in the local group policy editor (check the screenshot). The problem is after I logged in, the cmd ...
0 votes
0 answers
6 views

Potrace fix number of points

Is there an option to get a fix number of points when converting a bitmap to vector image using potrace ? I couldn't find any documentation about that
  • 101
0 votes
1 answer
57 views

Get the sharing dynamic computer name from CLI on MacOS

Is there a way to get the string in the screenshot from a CLI utility on macOS 12.6 or later? (some things were censored for obvious reasons). I tried these: scutil --get HostName scutil --get ...
  • 111
1 vote
0 answers
35 views

Is there a way to print a commands stdout/stderr only after a given 'timeout'?

Imagine a command which usually takes less than a second to complete an in this case you don't want to get bothered with verbose output, but sometimes it takes longer and in that case you want to have ...
  • 997
0 votes
2 answers
44 views

Setting environment variables in bash script doesn't work?

If I run this on the command line, it will make the commit be at the specified date: THE_TIME='2022-01-01T22:50:12 -0700' GIT_AUTHOR_DATE=$THE_TIME GIT_COMMITTER_DATE=$THE_TIME git commit -am 'commit' ...
0 votes
1 answer
14 views

Git Log of a particular file from a particular commit only

git log --graph --decorate --pretty=oneline --abbrev-commit --patch --full-history --follow -- "${FileP}" prints * b8800d8 (HEAD -> master, origin/master, origin/HEAD) chore(export): ...
  • 353
0 votes
1 answer
37 views

BATCH : The terminator ' is missing in the string

I'm currently developping a small batch script which is supposed to get my processor informations (and his current frequency) to print them in the standard output. My problem : when I try to execute ...
0 votes
1 answer
31 views

Bash script vs command line

I have started working on bash scripts. I have just observed a difference between executing a command line and executing the same commands but inside a script. In particular the command line is: for a ...
  • 125
0 votes
0 answers
25 views

Is possible to hide an error in CMD?

Well, i have a batch script to map a folder and execute a .exe file. It is like this net use:p \\\10.211.0.45\folder$ p: setup.exe But, when this command runs, this message appears "The ...
  • 1
0 votes
1 answer
42 views

Hardcoding current path to alias

I am developing a simple cli-application for timetracking. The idea is to have fish-aliases source r-scripts to create timestamps in a timetable. Like so: alias checkin='rscript (echo $PWD/checkin.R)' ...
  • 15
-1 votes
0 answers
26 views

How to command a 4 word search?

Using Kubuntu 22.04.1 : neofetch # OS: Kubuntu 22.04.1 LTS x86_64 grep --version # grep (GNU grep) 3.7 What is the Terminal command to do a 4 word search? Objective search 1000s of files ...
  • 115

1
2 3 4 5
250