Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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

0
votes
2answers
31 views

bash prompt messed up on arrow up

I have made some modification to my prompt with use of colors via tput. It looks like now when I try to do an arrow up lookup after few moves up, the prompt is being cut into half, what I mean by ...
0
votes
0answers
7 views

Delete identical files from file trees with diff

I'm updating my Drupal environment by comparing the currently live file structure with the latest patch level of Drupal core (official tarball). On Windows I used to use WinMerge for the job, but ...
0
votes
1answer
10 views

batch command line that duplicate any folder inside a parent folder and copy it to original folder

Example: I running window 10 and I have a parent folder that contain 3 folder: A, B, C X/A X/B X/C I want to duplicate 3 of them and copy each of that copy folder into the original folder. Ex: ...
0
votes
1answer
26 views

How to run VLC as command line command in windows

When I try to use VLC in command line in Windows, it opens up the VLC GUI. So is there a way I can use it as command line command instead?
-1
votes
0answers
18 views

How to detect when system generated beep sound in programmatic way ? [on hold]

I want to print TRUE in python or C when beep sound get generated in system in linux Operating system. As per my knowledge everything in linux is filesystem based so if one can help me to locate that ...
0
votes
1answer
27 views

In bash scripts, is the brackets notation better than back-quotes?

When I learnt to write bash scripts, I put the output of a command in a variable using back-quotes, e.g., ALLPDFS=`find . -name \*.\[pP\]\[dD\]\[fF\]` but most of the 'official' scripts (the ones ...
0
votes
1answer
28 views

Windows: Copy files in remoted machine from that machine to local machine

I am on a Windows computer, say "LocalA". I manually RDP into a remote server, say "RemoteB". From RemoteB I run a script which does a bunch of things and at the end it should copy/send files from ...
2
votes
1answer
26 views

How to check whether a folder is open or process is being run in windows explorer in cmd?

I'd like to write a .bat file that opens multiple folders if none of the aforementioned folders or files are open, and closes all of the multiple folders if any of them are open in Windows Explorer or ...
1
vote
1answer
40 views

How to pass Ctrl+C to script called from batch job

I am trying to avoid the effects of pressing Ctrl+C in a batch file somewhat similarly to How to supress "Terminate batch job (Y/N)" confirmation?. However, in my case, I want the signal to ...
-1
votes
1answer
27 views

Program that turns on and off windows settings according to conditionals from cmd

I have been meaning to make a .bat that turns on or off some windows settings so I could bind it to a keyboard shortcut. I made a .bat file that attempts to add a registry key NoDesktop so desktop ...
0
votes
0answers
13 views

only exit the first screen if there are multiple screens

If I have two screen in command line, is there a way to exit the first one instead of both together? I am trying Ctrl+D, but that will exit both.
1
vote
0answers
43 views

how can i send an attachment to an email address using a bat file without using my password? [on hold]

here's what i want i have an gmail account( i don't mind having any other account if this will work ) and a file /folder and want to send it to my own email using a bat file without using my ...
1
vote
1answer
18 views

Echo a value after a word in a file in Windows bash

I have a config file that contains the following: ~some stuff~ name test type online user me password hello serverip 192.168.20.1 timetolive 500 randomvar 200 ~some more stuff~ I ...
1
vote
0answers
16 views

Is there a tool which allows me to remove all metadata chunks for a WAV file? [on hold]

I'm working with a large number of WAV files, and most of them contain one or more chunks of metadata which I'd like to remove. I don't really need to write new data into them, but I'd like at least ...
0
votes
1answer
23 views

“Invalid parameters” error when copying to another folder

I have tried the following to copy the files in Data to another location but received the error "invalid parameters." What is wrong with my command? C:\xcopy c:\ProgramData\MySQL\MySQL Server 5.7\...
-3
votes
1answer
45 views

How to find license key with CMD or powershell without upgrading powershell to version 3.0 [on hold]

I have an issue cause I am trying to deploy a script which lists the major data of PCs, but unfortunately I cannot get license key of anything. All the computers in the company (except IT) use Windows ...
0
votes
0answers
7 views

Spyder crashes as soon as it open, but not if run by administrator [on hold]

I have Spyder 2.3.9 installed, but I tried the following also with Spyder 2.3.0, not with anything newer because any of the Spyder >3 do not launch on my computer -- maybe because I still have ...
0
votes
1answer
18 views

difference between COM port DeviceManager data and mode command in Windows

Why Windows mode command (mode COMX) is showing different data then same COMX has in Windows "DeviceManager", under Ports/Properties. Are these supposed to be in sync? See COM port via command line . ...
1
vote
4answers
69 views

How do I only use keyboard to control my computer for all everyday usages?

I have searched about this but I mainly get articles about broken mouse and temporary use of command line tools or GUI interface through keyboard. I only use Linux OS (Ubuntu and Debian). What I want ...
0
votes
1answer
26 views

grep -i “^(.).*\1$” sowpods.txt > output.txt

I'm using a scrabble words list I downloaded named "sowpods.txt" and I am trying to use grep to find all of words with these criteria. 7 letter word Starts and ends with the same letter Has the same ...
7
votes
1answer
232 views

Extract folder content from 7z archive to specific folder

I have a 7z archive file which, at the "root" level, contains a couple of files and then a directory, which in turn contains both files and folders, like this: - file1.txt - file2.txt - my_dir - ...
0
votes
1answer
15 views

Mapping a command not the same as writing command in vim terminal

I'm trying to use a mapping in my vimrc to execute a command. The command works if I directly type it into the vim terminal, but when I use the same command it stops typing it after the first space. ...
-1
votes
0answers
18 views

Whats a good email client for command line bodging? [closed]

I need 2 features: Ability to send emails from the command line, thru gmail or something free would be preferred. Will run a script/command any time it gets an email, piping the email as plain text ...
0
votes
1answer
23 views

How to create a shortcut of data files that run through another program

I am trying to run a commandline-based emulator and I need to drag an .iso file onto the .exe so the .exe will run the .iso, or I have to open command prompt there and run it with commands. I think ...
1
vote
1answer
50 views

Generate a PDF from the command line and fill up the page with as many copies of an image as possible?

I’ve been searching around a lot for this but wasn’t able to find a solution. How can I generate a PDF with an arbitrary paper format (say A4) and fill its pages with as many copies of an image as ...
0
votes
0answers
25 views

Program not executing in batch script at startup

I'm trying to run HDDScan-3.3 in a batch file at computer startup through "Local Group Policy Editor". I want to change some power management behaviours for an external hdd as silently as possible. I ...
0
votes
1answer
43 views

Why are PHP files in CMD launching Notepad++ instead of running in the prompt?

I'm trying to run a MediaWiki script called RunJobs.php, which I have done many times before on the same system. All of sudden, today when I try to run the script in CMD on Windows 10 instead of ...
1
vote
0answers
6 views

Filter specific process(es) in Resource Monitor with command line switch

Is there a way to launch Resource Monitor (resmon.exe) and filter on the Image name of the specific process(es) I want filtered from the command line? I often need to test 60 or 80 instances of the ...
1
vote
3answers
32 views

OSX Command line Find Duplicate Filenames with different extensions

I've gone through all the similar questions + installed few command line utilities like duff but with no sucess. In my Images directory, I have images with same name but with different extensions (...
1
vote
1answer
46 views

Highlight all the numbers in Cmd

How can I highlight the numbers in cmd? i.e, I want to highlight the numbers automatically when typing and in the old commands. How can I achieve this? I want to differentiate numbers from other ...
0
votes
1answer
47 views

Trying to rename files based on file size

I am trying to rename some MP4 files based on file size of mp4 files in another directory. I want to name all files with identical sizes to same name. Meaning if the file size of the source file ...
0
votes
1answer
35 views

How to use a batch script to zip files with unique passwords?

Good day. I was wondering if there is a way to write a batch script that converts files into password-encrypted zip folders (each zip folder will have a unique password)? I have seen several ...
0
votes
0answers
6 views

Auto highlight a custom syntax in cmd [duplicate]

I am trying highlight a syntax in cmd automatically when typing. Like in: C:\Users\User>echo "Hello" "Hello" C:\Users\User> In above command (echo "Hello") , I would like to change the color ...
0
votes
0answers
37 views

Linux grep command getting stuck in infinite loop while doing recurring search

When trying to search for a pattern in files of current and subfolders, the grep command is stuck in an infinite loop. The following illustrates the problem: /results/log/check_log: if ($f1 eq '...
0
votes
1answer
31 views

Invoke-command still using my PC as middle man during robocopy?

Can someone look at my code and tell me why when using invoke-command, that my PC is still being used as a middle-man? I'm trying to get the destination computer to transfer directly and not use my ...
-1
votes
1answer
49 views

find and grep produce different output if executed from script file or command line

I'm using these commands to to search in multiple pdfs, given a file path: >>find /home/ad0x/Documents/Skola/Flervariabel/Tentor -name '*.pdf' -exec sh -c 'pdftotext "{}" - | grep --with-...
0
votes
1answer
25 views

How to save output of bash whilst preserving colored text?

When I use some command in bash like npm audit, I can see the output with some colored text. I want to save the output with colored text preserved. I have tried selecting the text and saving in ...
1
vote
1answer
17 views

Symbolic Link Directory (mklink /D) The system cannot find the path specified

When I do this command: mklink /D "C:\Users\user\Desktop\MyDocs\VSCode" "C:\Users\user\.vscode" I get the error : "The system cannot find the path specified." I run cmd as admin. I am able to ...
0
votes
0answers
52 views

Running a long single line batch file containing files in a folder

I have a folder with over 2,000 files. I want to merge these files using a software called CloudCompare with the command line. The problem is that a single line cannot be over 8191 characters as per ...
0
votes
1answer
41 views

Batch Script - Run as admin changes %username% parameter

I have made a batch script, which contains various %username% fields in it. It needs admin privileges to run some commands, but when I do this all of the %username% fields that need admin to run get ...
0
votes
0answers
34 views

Fish shell not clearing history completely when starting

EDIT: I figured out what went wrong! The root cause of it was my .bash_history file; that contained the commands! I've configured my fish shell to clear my fish history (because of personal ...
2
votes
2answers
51 views

Sed Script to Capitalize “I”s in a Text File

I am trying to create a sed command that capitalizes the pronoun I in a text file. For example "i like dogs." should be "I like dogs." So far I have: sed 's/ i / I /g' This doesn't work in a ...
1
vote
1answer
35 views

Windows 10 Parental Control - Impossible to find the username

I'm trying to limit my son's account. I run Command Prompt as an administrator, then I use the net command: net user fabiute /times: V,18-22;S,18-22;D,18-22 The text "Impossible to find the ...
0
votes
1answer
47 views

How is the conversion/cautions things from batch version of robocopy to PowerShell version of robocopy?

After some googling, majority of posts online talking about the goods of PowerShell, and the environment going to use robocopy is Windows Server 2016. Thus, an original batch file with two command ...
0
votes
1answer
33 views

Date a GNU/Linux or Unix program was first released [closed]

When I uncover a new command, most recently column, I am curious as to how long this command has existed -- in appreciation of the longevity of Unix, its dedicated developers, and my own ignorance! ...
1
vote
1answer
63 views

Find name of computer attached to same network

I have two PCs connected to the same network. One is mine and there is one other. I want to find out the Name of the other PC using the command line. Please note: There are only two PC's connected to ...
0
votes
1answer
35 views

Find and rename first result in linux?

I have try using this commanline. find *.txt | head -1 | xargs -0 mv *.txt test.txt i receive. mv: target ‘02.txt\n’ is not a directory What wrong :(?
0
votes
1answer
16 views

Linux version sort; letters first

GNU sort -V is great for sorting IP adresses. Unfortunately it throws all lines with leading letters (as opposed to numbers) to the bottom of the pile. Is there a way around it? Note: • 192.168.0....
1
vote
0answers
21 views

php prevent '`rm -rf ~/`;' [migrated]

Good day guys. The issue I am having is specifically with handling this specific input case. A part of my project I need to do is to take argument though command line into a PHP script. for eg ./...
0
votes
1answer
32 views

.TargetPath was unexpected at this time

I want to obtain the Target of all the shortcut situated in taskbar folder. I am running following code in .bat file @ECHO OFF FOR %%i IN ("C:\Users\kirti\AppData\Roaming\Microsoft\Internet Explorer\...