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
1 answer
12 views

How can I batch convert a directory of subfolders, maintaining similar filestructure for the output

Right now I am converting using the following in Command Prompt: FOR /F "tokens=*" %G IN ('dir /b /s *.mp4') DO (ffmpeg -i "%G" -c:v libvpx-vp9 -crf 30 -b:v 0 -b:a 128k "%~nG....
  • 11
0 votes
2 answers
21 views

How do I use xargs to pass arguments as $1, $2, $3, ... to an inline script called with sh -c?

I want to pass tokens a b c as arguments of a script that will output a - b - c. If I have a script dummy.sh that does echo "$1 - $2 - $3" and a dummy.dat file containing : a b c d e f and ...
  • 107
0 votes
0 answers
13 views

How to send a message to someone with Command Prompt [duplicate]

So I'm just trying to send a message to another computer with the command: msg /server:{ip} */time:20 "{message}" With command prompt. But it isn't working. I'm wondering if it's because my ...
2 votes
0 answers
39 views

How can I use a widely-available cross-platform command line program to render a string containing emoji [closed]

I would like to use a widely-available command line program, the lighter-weight the better, to render a string containing emoji into a raster image. The rules are: must work on a minimum of OS X and ...
  • 121
0 votes
0 answers
14 views

Changing Advanced Printer Preferences using Command Line

I was looking for a way to change The Graphic Mode settings of an HP Printer using a command. This setting is located as the below screenshot: .
  • 1
0 votes
1 answer
24 views

Toggling values for Preferred Band for Wi-Fi card on Windows - can I automate it using Powershell?

Due to a group policy applied to my work laptop, I need to toggle the following setting every time when I reboot the laptop to use Second Screen, an app that enables pen and touch input from a Samsung ...
  • 953
0 votes
0 answers
10 views

How can I create global command aliases with pre-set environment variables or command line switches

I have a command I run and I can influence it's behavior using command line switches or environment variables like so: C:\> myCommand --option1 value1 --option2 value2 opt Or: C:\> set ...
0 votes
1 answer
20 views

Given text file with names, if folder has files with such names - delete it, else make folder with this name

I was curious to make such thing in windows cmd that is taking source.txt file with such names: User1 User2 User3 User4 User5 User6 Secondly, I have created the destination folder F:\Destination The ...
1 vote
1 answer
25 views

Unzipping files in multiple folders into subfolders in the folders with same name as zip

I solved this problem, see answer below. Now my question is, how to make it tolerate directories with spaces in the dir name. I'm looking for a command line for 7zip that achieves the following: I ...
  • 111
0 votes
2 answers
39 views

Error when trying to execute command with sudo su - user -- command

I am facing a problem when trying to execute a command using another user. If I do this sudo su - user direct Works perfectly Now if I do this sudo su - user -c direct I face this error -bash: ...
1 vote
1 answer
21 views

Trying to open a OneDrive directory file path using a batch file

I am attempting to open a OneDrive file path whose location is synced locally to my computer using a batch file, but after several trial and errors, I'm not able to determine what I'm doing wrong. So ...
  • 13
1 vote
1 answer
20 views

Move files into folders with name of file (in a network location)

I use this batch file all the time. It puts all files into their own folder with the name of the file. @echo off for %%f in (*) do ( md "%%~nf" move "%%f" "%%~nf" ) >...
  • 11
0 votes
3 answers
62 views

Do command line applications generally close between user commands?

I recently stumbled upon applications that apparently are run purely through the command line. One of such applications is Git. When I run it in cmd.exe, bash or powershell I usually first specify the ...
  • 389
0 votes
1 answer
34 views

Copy Mac Address of the most recent networking device inserted in my computer! Possible?

I borrowed a batch script from another user on this site so that I can copy a Mac address automatically whenever I click it. But I need modifying the script. Here's the link. Copy Mac Address into ...
  • 1
2 votes
0 answers
36 views

How to issue persistent commands on D-Link routers with factory firmware?

I recently bought a D-Link DIR-822 router and I can telnet into it and issue Linux commands. The thing is, say I issued random commands like; iptables -P FORWARD DROP iptables -I INPUT -p tcp --sport ...
1 vote
1 answer
18 views

How to force Windows to setup user account from command line?

I'm writing a Python script that configures new computers. It has two parts - one that runs as Admin (system setup) and one that runs as each user (user setup). The user setup part needs each user to ...
1 vote
2 answers
22 views

Run two executables after one another from different locations in batch file, with spaces in a filename and pass commands to the other

@echo off cd "C:\Program Files (x86)\World of Warcraft\" start "World of Warcraft Launcher" "World of Warcraft Launcher.exe" cd "C:\Program Files\obs-studio\bin\...
  • 11
0 votes
0 answers
32 views

Command works only when user ran it, not with eval

I'm trying to automate build. I made a complete script which can be seen here, but I made a minimal example: #!/bin/bash trap "exit" INT DIR="spigot/spigotJars/install" if [ -d &...
  • 135
0 votes
1 answer
24 views

How to delete all resource groups forcibly without prompt for confirmation using Azure CLI cmdlets?

Tried the below cmdlet to delete all resource groups in particular location: az group list --query "[?location=='westus']".name -o tsv | xargs -otl az group delete -n It is asking me to ...
  • 1
1 vote
0 answers
29 views

Where is /usr/local/bin on windows

For context, i installed apktools software by moving file to C:\Windows and run the software from command prompt. I use windows 10 (also enabled windows subsystem for linux) and just installed ubuntu ...
  • 111
0 votes
1 answer
16 views

How to make cURL use a proxy on Windows without adding options?

I need cURL to access a website using proxy, as the site is restricted in my region. However, I may not be able to add -x option to the cURL commands (just suppose commands are executed by a closed-...
0 votes
1 answer
40 views

Executing powershell script via cmd

The powershell script I have works as expected when opened in powershell Invoke-WebRequest -Uri host.com -Body "Param1=Value&Param2=Value&Param3=&Param4=Value" -Method POST but ...
  • 3
1 vote
1 answer
38 views

Powershell "one liner" for Get-Content and Beep in the console

I love the command Get-Content, especially with the -tail and -wait parameters... But, I'd love it even more if I could write a 'one-liner' to have it use Beep whenever a new entry shows up. I've ...
  • 11
1 vote
1 answer
28 views

What's wrong with my directory file permissions and how to copy directory's file permissions to another directory?

I'm dealing with two directories, the one being the parent of the other (but that's irrelevant for the question). I want to read the files in one directory, using an application, but that seems not to ...
  • 1,472
0 votes
0 answers
6 views

Network utilization data (DataReceived/sec, DataSent/sec) using "wmic" differs from Task Manager information

I want to get BytesReceivedPersec and BytesSentPersec from command. I used this commnad. wmic path Win32_PerfRawData_Tcpip_NetworkInterface get Name,BytesReceivedPersec,BytesSentPersec And I got this ...
1 vote
1 answer
52 views

Iterate through directories, execute exe on files, use folder name for resulting file

I have a folder containing magazines, whose pages are in JPEG image format. Like so: The_Camera_Craftsman_1955_Vol_l_Iss_2 The_Camera_Craftsman_1955_Vol_l_Iss_3 The_Camera_Craftsman_1955_Vol_l_Iss_4 ...
  • 13
0 votes
0 answers
17 views

How to move all old files from Downloads to the trash with one or more terminal commands in macos?

I already found the command with which I can select all the files and directories that I do not want to send to trash. That command looks like this: find ~/Downloads -newerat "2 months ago" -...
  • 121
0 votes
0 answers
17 views

How to cut 1 video into many different videos with different lengths? ( FFMPEG)

I need to cut a video with a length of several minutes into many different videos, In all but the videos cut from the original video will have different short lengths. what do i need to do? This is ...
0 votes
1 answer
19 views

Which Linux commands are available after WSL activation, but without to install Linux?

After activation of Linux subsystem on Windows 10 I realized that there are some Linux commands, which are available without of Linux installation. I.e. curl works. As a newbie I thought firstly, curl ...
  • 204
0 votes
0 answers
33 views

How to move all files of directories or subdirectories to another directory?

My files have the following structure: Artist --Album_A ----Track_01.mp3 ----Track_01.flac ----Track-02.mp3 ----Track_02.flac --Album_B ---CD1 ----Track_01.mp3 ----Track_01.flac ----Track-02.mp3 ----...
0 votes
2 answers
43 views

How to programmatically disable OSX from charging?

How can we programatically disable OSX from charging when connected to power source? And how can we programatically check the current battery percentage? In order to extend battery life I'd like to ...
  • 555
0 votes
0 answers
21 views

psexec works erratically. My GUI application runs maybe 5% of the time. Why?

As you might be aware, running a GUI application remotely is a pain under Windows. Most people use psexec. I would use it too, but I have some issues with it. My program sometimes works with it, but ...
  • 15.8k
1 vote
1 answer
54 views

rmdir favorites Access is Denied

Command prompt: CD C:\Users\Example\ rmdir favorites Access is denied. How do I delete the Favorites folder via the command prompt? Yes, I want to do this. Yes, I know this folder is for Internet ...
  • 1,897
0 votes
1 answer
32 views

Trouble with splitting a .mkv file in half with FFMPEG using one command, had to do it one at a time with a slightly different command

So I have a ~400GB .mkv file I wanted to upload to YouTube, unfortunately for me YouTube has a 256GB limit. So I Googled if I could split the file with FFMPEG and found the following article (FFMPEG ...
0 votes
0 answers
20 views

Alias not exported from .zprofile to folder location that exists

In my .zprofile, I have a bunch of aliases that follow the same pattern: export remotedir="$HOME/remote" export localdir="$HOME/local" etc. They all work, except for one, which ...
0 votes
1 answer
21 views

Bulk changing pictures without any perceptible visual difference

I need to upload some photos to a website, I already uploaded the same photos to the website in the past, now I removed them from the website and I'm not allowed to upload the same exact pictures ...
  • 3
0 votes
1 answer
16 views

Running a bat file in ConEmu opens multiple command windows

I install ConEmu to run a specific BAT File which should run multiple commands in a command prompt, the problem is that instead of these new command prompts windows being open, I wish that those ...
0 votes
1 answer
14 views

How to run a command line in different folders - loop

I am facing a problem trying to run the following command line : laszip *.laz That command is supposed to uncompress all the files which are in the folder I am in, from the cmd. I am supposed to run ...
0 votes
1 answer
28 views

bash: XY: command not found; when XY is an existing alias

I've just noticed that when I call fc, I got the following error message: zoltan@adrian ~ $ fc bash: vi: command not found The which command returns a similar result: zoltan@adrian ~ $ which vi which:...
0 votes
0 answers
29 views

Get CPU Usage of Specific Program Command Line Windows

Process explorer can show me the CPU % usage of a particular program: I would like to obtain this number through command line to automatically sample the percentage utilization of a process. It has ...
  • 968
-1 votes
2 answers
50 views

Convert CSV to text and automatically remove quotes and a specific word - Linux

I need to convert .csv to .txt format via CL (Command line) and automatically remove quotes and a specific word - Linux. Example: I have multiple exported csv files that have: At first row I have: &...
  • 1
1 vote
1 answer
43 views

Does CHKDSK /R overwrite unused space?

This may seem like an odd question but I was wondering if "chkdsk /r" overwrites all the unused space on a target volume. I understand that the purpose of "chkdsk" is simply to ...
0 votes
1 answer
30 views

Using command prompt or power shell, is there a way to move a bunch of pdfs to different folders based on the file name and folder name?

I have over 1000 pdfs that I need to move to their own folders. The pdfs are named "TRR 0000.pdf", where the 0000 changes, but the TRR always remains the same. So "TRR 0000.pdf" ...
0 votes
0 answers
13 views

Can I Chain chrt With taskset So They Both Apply to Same Program On LInux?

I want to set a real-time priority for a program and pin it to a certain CPU core on a Linux server. I am aware I can affect these properties after a process is running. Is there a way to do it when ...
0 votes
1 answer
36 views

Select photos taken every five minutes

I have, on a shared drive, several folders containing thousands of photographs. I'd like to create new folders containing only those photographs taken every five minutes, i.e., those with "Date ...
  • 3
0 votes
0 answers
25 views

Does CHKDSK have any volume size limitations?

A colleague of mine mentioned he thinks CHKDSK, since it's so old, probably doesn't support very large target volumes. For example, if you wanted to run CHKDSK on a single, super large volume like say,...
0 votes
0 answers
20 views

How to reverse the effect of robocopy junction link command used to change the directory of ProgramData from C to D?

I recently followed the following advise to free up space on my C Drive, however, I wasn't able to delete the ProgramData folder after executing the command below. Any idea how I can reverse the ...
  • 1
0 votes
0 answers
24 views

How to stream adding a logo a scaling

I have this command line, ffmpeg -reconnect_at_eof 1 -reconnect_streamed 1 -reconnect 1 -reconnect_delay_max 4 -i hello.mp4 -i logo.png -filter_complex "overlay=10:10" -vf scale=1024:576 -...
0 votes
0 answers
10 views

Arch + KDE taking forever to shutdown from command line

When I shutdown from the plasma GUI the shutdown process is normal speed (~10 seconds). However every time I shutdown from the command line (sudo shutdown now or sudo reboot) it takes quite a long ...
0 votes
1 answer
14 views

How to make an output file specific to each variable in while read line loop? Nikto ZSH

In Zsh, I want to run a Nikto scan on a list of URLs and have the output be: ($line)-nikto-results.html I have so far : while IFS= read -r line; do nikto -h $line -o $line-nikto-results.html -F html; ...

1
2 3 4 5
249