Skip to main content

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
0 votes
0 answers
58 views

How to create1080p and 4k black png background text in center using ffmpeg?

I’m trying to create a png black background with text in center using ffmpeg I left an image example from Canva. Please someone help by giving command line/parameters example for 1080p and 4K?
Eddie Valentin's user avatar
0 votes
0 answers
29 views

I need to hammer a few last nails on my typing productivity solving the problems that I am facing with keyd. Can you help me out?

So the problems with keyd that need to be address so that I can have my peak typing efficiency are: Enabling context menu key as right super when pressed and as normal context menu key when clicked. ...
souraj ghosh's user avatar
0 votes
1 answer
112 views

ls -ltr on the terminal lists the files but says "No such file or directory" in a shell script

I am new to Bash and am practicing some shell scripts. I wanted to write a script to list all the folders and their file count, if a root path is passed as a parameter value from the terminal. The ...
MNIA's user avatar
  • 1
2 votes
1 answer
120 views

Give python program location services access via command line on MacOS

I am trying to run a python program requiring location services on MacOS Sonoma 14.4.1. I was using iTerm2 and expected a pop-up asking if the app could have access to my location. However, nothing ...
Gabriel's user avatar
  • 23
0 votes
1 answer
56 views

Execute a remote shell script from within screen via SSH and view stdout in one command

Couldn't find an answer for my particular use-case in the hours I've unsuccessfully researched this. I have a script located on machine B. I am aiming to run a command on machine A that establishes an ...
DeathToMediocrity's user avatar
0 votes
0 answers
57 views

AutoComplete in Python Terminal

How to enable AutoComplete/ suggestions in Python Terminal, when launched? Like PSReadline in PowerShell, or Command Prompt with Clink installed. I tried to install autocomplete, but there has been no ...
Mr.Key7's user avatar
  • 823
1 vote
3 answers
167 views

Powershell - keep only lines in txt files contain some selected words

I have a txt file and I would like to keep only a few lines in it I want to a command that turns this txt file: ;FFMETADATA1 title=TNT disc=01 comment= lyrics-eng= \ \ \ album=Classic genre=Older ...
Clamarc's user avatar
  • 663
0 votes
0 answers
50 views

Display new prompt after tty redirect on second terminal

I'll try to explain the title better :) I have two terminals tty1 and tty2, let's call them that. From tty1 I redirect the output from echo to the tty2 terminal with: echo hello > $(tty2) This ...
Daniel's user avatar
  • 1
0 votes
1 answer
53 views

How to delete directory called [ '.. ]

I am amazed by the things Windows lets you do, then doesn't let you undo. Doing some programming, I ran a build script and specified the output folder as '../my/folder' From this, it created a folder ...
Stuart Aitken's user avatar
0 votes
0 answers
26 views

Program associated with custom file extension isn't receiving command line arguments

When Python is first installed, the extension .py is associated with C:\windows\py.exe, which runs the Python script. Now I do a lot of Python development, so I set it to open with my IDE instead, but ...
xenon134's user avatar
17 votes
2 answers
4k views

How does ls know how to output its results?

While creating a bash script, I found that this code ls puts all files on one line: pi@raspberrypi:~/ptlrestinterface$ ls update.sh web.config MyApp.runtimeconfig.json still ls | head -n1 ...
Bart Friederichs's user avatar
0 votes
1 answer
38 views

How to extract a part of a line that is between two specific strings using a batch script [closed]

I am trying to extract strings which are between <meta property="al:ios:url" content="snssdk1180://live?room_id= and " data-rh="true">. Example Input: <meta ...
Enema State's user avatar
0 votes
1 answer
31 views

How to paste encryption password for rclone's "crypt"

I'm trying to restore my rclone configuration and I have the original randomly generated encryption password and salt for one of my remotes. However, when setting this up in rclone on Windows, I can't ...
user9564371's user avatar
3 votes
1 answer
820 views

CMD closes immediately on Windows 11

For a couple of months, I could not open the command terminal. It closes immediately (I see only a frame for a short time). I'm on Windows 11. I see there are background processes that use cmd. I can ...
Tamas's user avatar
  • 43
2 votes
1 answer
91 views

Exporting excel data with powershell for robocopy

I have on my hand a 300 lines excel sheet with source path and destpath for robocopy, to avoid copy paste all the path on a .bat file I try to make this powershell script: # Import the Excel module ...
Maslie's user avatar
  • 114
0 votes
1 answer
33 views

sed does not consume rest of the line

I have one line of different words stored in a txt file N/A 9.0 Yes Yes N/A N/A N/A N/A 8.8 Yes Yes N/A N/A N/A N/A 8.7 Yes Yes N/A N/A N/A N/A 9.2 Yes Yes Yes Yes Yes Yes 9.1 Yes Yes Yes Yes Yes Yes ...
Cobra Kai Dojo's user avatar
1 vote
1 answer
208 views

Kitty terminal: How can I attach to a zellij session upon starting up Kitty

I want zellij attach -c to run once Kitty is loaded up. I tried adding startup_session launch.conf to my config file, and writing kitty @ send-text "zellij attach -c" in launch.conf as well ...
Oneechan69's user avatar
-2 votes
2 answers
147 views

(Windows 10) Symbolic link failing, claims "system cannot find specified path"

I am trying to create a symbolic link between %ProgramData%\PopCap Games\Insaniquarium and %ProgramData%\Steam\Insaniquarium to fix compatibility problems with the game Insaniquarium, however, the ...
AndreM962's user avatar
0 votes
1 answer
76 views

Why do string variables in a bash script behave differently when echo'ed than they do when passed to an executable?

I have the following script: #!/bin/bash KID3=$(command -v kid3-cli) ARG1="-c 'get'" file="'1-01 - Johann Strauss - __Waldmeister___ Ouverture.flac'" echo Command: echo "$...
Frank van Wensveen's user avatar
2 votes
2 answers
841 views

How to hide or disable the cmd console when starting an executable

I wrote an executable that displays a window on the screen and gets some use input. It is bound to ⊞ Win+N: #n:: Run "C:\Perso\dev-perso\dly\dly.exe" My problem: this also opens a cmd (or ...
WoJ's user avatar
  • 3,253
1 vote
0 answers
68 views

How to find files in a folder structure and group them into a new folder - Windows CMD

I´m looking for a way to search for files (pdf) in a folder structure that have a common identifier although in different parts of the file name (Eg. "10000 january.pdf" and "march ...
Dagef's user avatar
  • 21
1 vote
0 answers
372 views

How do I add a user with "Full Control" permissions to folder without changing owner of the folder (I.E.) Administrators, using the command line?

I want a command-line solution to add a local user account to the permissions table for a directory and grant the account full access... WITHOUT changing the ownership of the directory. I'm looking ...
fmotion1's user avatar
  • 127
0 votes
1 answer
227 views

Back from Elevated Admin to Not Elevated

When running Batch Script with Administrator privileges, how to back to not Admin? I tried this example: @echo off :Demo CLS fltmc >nul && (echo Admin& set $A=y) || (echo Not Admin&...
Mr.Key7's user avatar
  • 823
1 vote
1 answer
67 views

Remove Empty Line at Top Command Prompt Start Up Display

This question is a continuation of post Modify Windows CommandLine Start Up Text After I succeeded in modifying the cmd startup display from its origin, so that it looked like this: CMD: Still there ...
Mr.Key7's user avatar
  • 823
0 votes
1 answer
87 views

Modify Windows CommandLine StartUp Text

I want to replace both text Powershell Startup and CMD StartUp below # PowerShell PS C:\Users\Admin> # CMD C:\Users\Admin> with PS > CMD > Like Python Start Up that only showing >>...
Mr.Key7's user avatar
  • 823
0 votes
0 answers
120 views

MacOs equivalent of adding a user to the linux dialout group on for permissions setup for UART communication

I'm working on a project where I'm interfacing with some hardware and want to monitor the data from some sensors using a specific tool. The tool doesn't have official support for MacOS but I've ...
sobbingDev's user avatar
1 vote
0 answers
68 views

Strange PSEXEC Output

Windows 2016 server from 2012. Sometimes when I run commands on multiple remote computers I'll get a strange output at the end of the command: psexec64.exe \\<computer1>,<computer2>... CMD ...
David Shader's user avatar
1 vote
0 answers
25 views

How do I delete all folders with a similar name that do not contain large files on linux commandline?

On my linux server for my media library I used a function to change show season names to have a leading zero when needed, so "Season 1" would be Season 01" and so on. The problem is ...
Graham F's user avatar
0 votes
0 answers
73 views

Setcap is not allowing qt program to load libraries

For loading libraries I am doing export LD_LIBRARY_PATH=./SupportLibs:$LD_LIBRARY_PATH Loading of libraries fails when any cap abilities is set for qt application, sudo setcap =ep Application If I ...
UNREAL's user avatar
  • 101
1 vote
2 answers
146 views

FFMpeg: How to get the real return value in bash

I've always used ffmpeg via a cmd-script and I always could check the %ERRORLEVEL% which was always '0' on success or '!0' if an error occured. I'm trying to recode my cmd-scripts in bash (using msys2 ...
lhksoft's user avatar
  • 13
0 votes
1 answer
43 views

Windows. Does it matter what order flag-switches are placed in the "dir" Command-Prompt command?

Would dir /a /b /s /o:n always work exactly the same as a different permutation of those flag-switches, such as dir /b /o:n /a /s. Note, I include /a, without any of its Attributes, as I had an ...
william's user avatar
  • 45
0 votes
2 answers
75 views

Getting Two Character Variable Without Pressing Enter (PowerShell/ CMD)

Bash Script: #! /bin/bash read -n 2 -p '2 digit:' ans; echo $ans When i finish input two character, the script continue, without waiting me to press enter. And what I have pressed saves to the ...
Mr.Key7's user avatar
  • 823
3 votes
1 answer
312 views

Is there a Windows equivalent of Linux `.desktop` file to execute various commands (like as many custom "apps")

I am using Windows in parallel with Linux again, and I've got all the Linux habits and reflexes, without which I feel very frustrated. For example, how to create a file to launch a terminal with a ...
cipricus's user avatar
  • 1,284
6 votes
2 answers
742 views

Are there commands in PowerShell 7 to split the current window into four and request to run Python files in each of them?

Currently, I click + 3x while holding Alt to create four divided terminals within the same tab: In each of these, I need to run a different Python commnd: cd "C:\Users\Computador\Desktop\Test ...
Digital Farmer's user avatar
3 votes
2 answers
406 views

What Equivalent %* of Batch in PowerShell

Batch Script: @echo off if not "!!"=="" setlocal enabledelayedexpansion for /f "tokens=4*" %%a in ( 'dir /AD "%USERPROFILE%\" ^| find "DIR" ^| Find /...
Mr.Key7's user avatar
  • 823
0 votes
1 answer
90 views

How to open the CMD or the PowerShell in the Windows terminal when you open them as Admin?

I noticed that when I open the CMD or the PowerShell in non-admin mode, it always opens in the terminal; however, when I open the CMD or the PowerShell as admin, it always opens the old window. Indeed,...
Federico Navarrete's user avatar
0 votes
0 answers
42 views

7-Zip command line when compressing keeps including files not in the filelist if they are of a same name as something in the list

Trying to compress selected files and folders into a zip by dropping them onto by bat script. Everything works well except for the cases where I have subfolders with files of the same name as in my ...
Anton Shmetelko's user avatar
0 votes
1 answer
163 views

Opening command prompt as admin Using a Desktop Shortcut with Hard-coded admin username

TLDR version on the bottom. I would like to create a desktop shortcut that would open up command prompt as if I had used the 'Run as Admin' option, but by just double clicking a shortcut and then ...
mbelsky's user avatar
0 votes
0 answers
63 views

column -x: how to specify the number of columns?

For column -x, how to specify the number of columns (say, 4)? Is it possible at all? Extra: from man column: -x, --fillrows Fill rows before filling columns.
pmor's user avatar
  • 346
0 votes
0 answers
48 views

One liner command to ssh to server2, switch to another user in server2, ssh into server3, run commands in server3 and get output

Because I can only get to server3 from server2 (Server2 running CentOS7), I'm trying to create a "template" command or a script that I can use to : ssh to server2 switch to another user in ...
Tlink's user avatar
  • 179
0 votes
0 answers
32 views

scheduled batch file stops running and reports error

I have a batch file that contains the following line: @robocopy E:\ G:\ /DCOPY:DAT /xd $* syste* /xf ~* /s /xo /np /copyall /log:c:\back-EG.txt It is scheduled to run on the first day of month. I ...
joehua's user avatar
  • 287
0 votes
0 answers
80 views

It seems like "-p" sizing longer works with tmux. Is there any workaround?

It seems like -p sizing longer works with tmux. Before a recent update, the script had 4 panes; now, only see 3 panes. This line seems to have stopped working: tmux split-window -p 27 The script use ...
Merlin's user avatar
  • 131
1 vote
0 answers
56 views

How to detox filenames in a bash script with no errors posted?

OS: Kubuntu 22.04.4 LTS x86_64 detox 1.4.5 To display above: neofetch --stdout |grep 'OS:' detox -V Here is a toxic filename, starts with s1: s1 Ä Ö Ü - ä ö ü Science & < > " 1 \ 2 ⁄ 3 ...
joseph22's user avatar
  • 367
0 votes
0 answers
82 views

How to launch another blank terminal in Kali Linux?

When I launch another terminal in Kali Linux with Cmd+Shift+T, I can see Shell No. 2 tab created. However, it is just a copy of Shell No. 1 and all the commands I ran on Shell No. 1 are visible on ...
kerblue's user avatar
2 votes
1 answer
117 views

Execute self-extracting bash script (with binary data appended) w/o saving it first

I have a self-extracting bash script (binary data appended to the end) like this: #!/bin/bash export TMPDIR=$(mktemp -d) ARCHIVE_START_LINE=$(...) # <omitted> # extracting data archive into a ...
Edward Ruchevits's user avatar
1 vote
1 answer
34 views

Moving directories that names end in - number matching a list.txt file

Graphic of Folder Structure : I am very new to advanced shell commands and scripting. I have fundamental terminal knowledge but have never attempted to create an automation like this before. A pure ...
Roco Gman's user avatar
0 votes
1 answer
37 views

Extract filepaths of .MP4 files in subfolders of main folder to textfile

I am on Mac. I want to use terminal or something to extract the filepaths of the .MP4 files within a folder with multiple levels of subfolders. I have a main folder that has subfolders. Each subfolder ...
Helppleaseme's user avatar
0 votes
1 answer
97 views

Batch script and get the output value of a found key

All works fine in a CMD prompt, but, I need put in a bat file to run, but cannot get the output of the Reg Query cmd, and then run another query from that. Since what I am looking for is an App ID, ...
LuckyCharms's user avatar
10 votes
4 answers
2k views

Why does assigning a variable with command substitution, and then echoing that variable, always fail?

Why does the following not work in Bash? # Ensure TEST is unset export TEST='' echo "Hello world!" > test.txt && TEST="$(cat test.txt)" echo "$TEST" It always ...
Rob's user avatar
  • 103
0 votes
1 answer
119 views

CMD/Powershell looking for "curl" executable in the wrong location despite PATH

I have a strange issue with both CMD and Powershell on Windows 10 that has been giving me some trouble. An unrelated scriptwas failing when running curl, and after some investigation it looks like a ...
Syst3ms's user avatar
  • 11