A command-line interface (or CLI) is a method of interacting with your OS or software by typing commands on your keyboard.

learn more… | top users | synonyms (3)

0
votes
2answers
97 views

How to input text in a file in a specific line?

what am trying to do is to input the command sudo in a file with echo or something similar but not in the first line but in another line after a text ie. I have this text line[4]command=sh -c "...
2
votes
1answer
2k views

PHP won't run on command line Linux

I think I may just be missing something simple, but I can not get PHP to run anything on the command line. I'm using Linux Ubuntu. All the exact same files run as expected via the web. I have tried ...
3
votes
2answers
3k views

cat “input file is output file” while trying to combine multiple files into one

The plan was to collect all source lines of Java into one file, recursively: $ find . -name '*.java' | xargs cat >> all.java But there was an error: cat: ./all.java: input file is output ...
0
votes
1answer
67 views

Restart Service on Remote System Batch

Just having trouble with a batch and need some clarification on 'IF', 'ELSE' and 'GOTO' @echo off sc \\RemoteServer stop "My_Service" :query sc \\RemoteServer query "My_Service" if %state% == 1 ...
3
votes
2answers
6k views

uploading music automatically with Google Music on a Linux server

So I've seen questions like this one looking for help uploading music with Google Music on Linux, but none really seem to confront the notion of solely using the command line. I've downloaded the ...
0
votes
0answers
27 views

How can I set temporary environment for explorer (renewed) [duplicate]

On windows 8.1 command prompt (cmd.exe) I can change environment variables, i.e. path. When I then start an explorer instance, that instance takes the default (its parents?) environment, not the one ...
0
votes
1answer
106 views

How to open Command Prompt from Command Prompt

How do I open the command prompt from a command prompt? cmd just gives out data about the command prompt. My google-fu is failing me - I have already searched but I guess my query is too generic to ...
0
votes
1answer
1k views

How to extract part of a string between 2 delimiters, in Windows batch file?

I have a variable length string starting with START and ending with END as delimiters. I want to extract the string between START and END. I tried doing SET _result=%String:~6,-4% ECHO %_result% ...
0
votes
1answer
166 views

Windows 8.1 - Command Prompt with encoding error in special chars

I have a fresh install of windows 8.1 and the command prompt is like shown in the image below,that is, special chars with encoding error. It seems there is not many users with this same problem, since ...
3
votes
3answers
3k views

How to delete all hidden .swp files from terminal

How can I delete all .swp files? I tried rm *.swp but I got rm: *.swp: No such file or directory rwxr-xr-x 16 teacher staff 544 Jan 17 13:19 . drwxr-xr-x 19 teacher staff 646 Jan 16 12:48 .....
2
votes
2answers
3k views

Check Multiple if conditions in bat file/ and operator in bat

I want something like this:- if %ERRORLEVEL% GEQ 1 && %ERRORLEVEL% neq 255 GOTO Not closed by user . But this syntax is not working.
1
vote
2answers
5k views

How to schedule taskkill in bat file

I want something like this:- taskkill 7z.exe after 50sec. code 1 code 2 code 3 7z.exe will be killed after 50 sec but the program should execute code 1 code 2 code 3 without waiting for the ...
0
votes
2answers
94 views

Redirect a cat command when using wildcards as input

I have the following command that takes a certain part of a file in the current directory, writes it to a temporary file, gets a part of another file one directory up, writes it to a temporary file ...
4
votes
1answer
2k views

How to add current date/time to clink/cmder prompt

I'm a rather happy user of clink via the great cmder package. The only thing I miss is an easy way to set the command promt to display the current date/time (and last exit code, history number, as in ...
1
vote
2answers
3k views

Set environment variable containing at symbol

I would like to set an environment variable containing the URL of my proxy server with my credentials, as in this blog post. The problem I'm having is that my password contains an at symbol and I am ...
2
votes
1answer
3k views

How to show extraction progress of 7zip inside cmd?

7z.exe do not show any extraction progress in cmd."C:\Program Files\7-Zip\7zG.exe" -y x -pPASSWORD "D:\Myfile.rar" Extracts the file with a GUI progress-bar. But I don't want a GUI progress bar. I ...
2
votes
2answers
3k views

Use Batch findstr for files with whitespaces

I'm trying to search for a string in a given file. This file can have whitespaces in its name and I'm having trouble with the Batch file. I can easily do this by console getting the correct results: ...
0
votes
1answer
6k views

Create a Batch file (.bat) to search an string through multiple files

I am using Windows Server 2008 and I need to create a Batch file (.bat) to search for a given string in 20.000 to 30.000 files located all in one folder in the same level (without subfolders). I have ...
2
votes
0answers
1k views

Using the thunderbird command-line, how can I open a specific email by message-id?

Thunderbird 24.2.0 has a -mail command-line parameter, with which a specific mail can be opened from the command line: $ thunderbird --help -mail <URL> Open the message specified by this ...
4
votes
1answer
1k views

*nix find -type flag: can it accept multiple types?

I want to use find for getting all simlinks and regular files. I can use the -type for these individually, and I can use -o to string them together, but I apparently can't do -type fl. Is there a way ...
0
votes
1answer
88 views

Flash inactive tab in ConEmu (like Console does)

Is there a setting on ConEmu similar to the "Flash inactive tabs" setting in the Console app? When I run three scripts in three different tabs in ConEmu I would like either of the two tabs that are ...
2
votes
1answer
163 views

How to hide error dialog box in 7zip?

I am using "C:\Program Files\7-Zip\7zG.exe" -y x -pmypassword "D:\Myfile.rar" -o"D:\Extracted Files\" for extracting a file encrypted with password. Now if 'mypassword' is not the correct password ...
1
vote
1answer
212 views

Why does `hg diff -I filename` not show my file buried in a subdirectory?

Sometimes I make a few changes before remembering to commit. Sometimes they are unrelated. So I first hg stat to see which files I changed, and then I hg diff specific files if I don't remember ...
0
votes
1answer
567 views

How to make NppExec show script-created windows?

I am trying to run a Python script with NppExec. It runs fine (the console is updated with whatever I print to stdout in the script) but the window the script creates (through PyQt) never shows up. If ...
1
vote
1answer
221 views

Any command-line or batch cmd to concatenate multiple .msg files?

I have 50 .msg files in one dir. Is there a Windows command-line method to concatenate those files into a single file? I am using Windows XP SP3. I don't want to type the name of all files.
0
votes
1answer
258 views

what are the commands to redirect a subfolder of C:\ProgramData to D:\ProgramData

I am using Garmin Express, a program to update my Garmin Nüvi 2595LTM GPS device. I noticed that Garmin Express is taking up over 6.3GB in the C:\ProgramData folder. I only have a small SSD as the C: ...
2
votes
2answers
92 views

How to get the time in Hawaii from the OS X command line?

As the title states, I would like to get the current time in Hawaii (UTC -10:00) from the OS X command line. Could anyone help?
2
votes
3answers
10k views

Ls command in bash script says 'No such file or directory'

The following is the script I am running #$1 - Argument declare IPATH="sample/" declare F=$IPATH$1 echo $F ls $F The input is ./script.sh "Fil*" The echo output is - sample/Fil* when I run the ...
0
votes
1answer
466 views

Replace a variable with its value inside powershell command prompt

In Windows PowerShell, is there a way to "evaluate" a variable so that I have its value pasted into the command prompt? The usage scenario I would like to perform is as follows: let's say I have a ...
0
votes
3answers
1k views

How to bring calc.exe to front?

I have the following code assigned to a VAIO button: C:\Windows\System32\calc.exe But each time I press the VAIO button I get a new instance of the calculator in a new window. What would be the ...
0
votes
4answers
45 views

Change terminal output location?

I like to SSH into my raspberry pi at home. I want to be able to write a command via SSH that outputs to the terminal that's open at home. Is this possible? If so, how? Thanks!
2
votes
2answers
6k views

Looking to create a batch file capable of editing a line (or word) in a text file

I have a text file (...\config.txt) containing 2 lines which looks like: Preamp: -4 dB Include: surround.txt I need to change "surround" to "headphones" in that config file. I really need to make 2 ...
1
vote
2answers
2k views

Make Batch File Cmd Window Stay Open For X Seconds

I'm running a batch file on a server to dump a MySQL database. I'd like to have the cmd window stray open for, say, 20 seconds, and then close. That's so if I run it manually I can see that it ...
0
votes
2answers
789 views

Multiple instances of cmd.exe in one window?

I'm wondering. Can I open multiple instances of cmd.exe in one window. I've been stuck because of this a couple of hours. Btw. I have no idea on how to do this nor if it's possible. EDIT: I am very ...
2
votes
2answers
313 views

How can I select and copy a few lines of code while using a command line OS?

I am working with the Raspbian Linux distro that comes with the Raspberry Pi. I am running the Pi so that I can only operate it from the command line, so I have no user interface and therefore no ...
3
votes
1answer
945 views

CLI stopped working when running php artisan serve - Laravel 4 Win7

I added a path to my environment variables : C:\wamp\bin\php When I run the command php artisan serve it says Laravel development server started on `http://localhost:8000` But after that a dialog ...
2
votes
1answer
886 views

YUM root update error

I'm getting an error that's new to me when I attempt # yum upgrade in a Fedora 20 Virtualbox machine. I've given it 3gb ram, and it's running atop a Haswell core i5 Any fixes are appreciated! Or is ...
2
votes
1answer
303 views

How can I log all my command-line activity?

I just had a Heisenbug that completely disappeared on me. I'm convinced that something funny must have happened when I compiled my program several days or a week ago. But sadly, my Windows (MINGW) ...
0
votes
0answers
159 views

how do you monitor the progress of a command line program?

We have some custom command line programs at our Windows shop. These commands are scheduled to run (from within bat files) at regular intervals using the Task Scheduler. Our tasks pull data from ...
0
votes
4answers
11k views

Make batch file run in the background of the command prompt while continuing to use command prompt

I am use a windows command prompt for hours a day at work, and I want to spice things up. I want my text color to change color every 1 second. I have a batch script that does this. @echo off set NUM=...
2
votes
1answer
170 views

vim: how run external app on a file if filename in register or variable

If I issue the Ex command :!xv file.png all is well, and xv starts and displays the file. But if file.png is in a register or variable, which is necessary as I wish to do this in a script, ...
1
vote
2answers
465 views

Detect invalid JSON files in directory tree

I want to fail a build if the directory tree contains a JSON file which is invalid according to the jsonlint package from NPM. I thought this would be as easy as running: find . -name \*.json | ...
0
votes
1answer
306 views

Adding audio to video file using melt

I have a video file say 'myvideo.wmv' of 2 minutes length, which does not have audio inside it. I have an audio file, say 'voice.mp3', of 16 seconds length. I want to add audio to 'myvideo.wmv' using ...
1
vote
1answer
711 views

Windows 2008 - `Where` command shows correct path but the actual command does not work

On my Windows 2008 VM, I have Git installed. When I run following command where git I get following output C:\Program Files (x86)\Git\cmd\git.cmd C:\Program Files (x86)\Git\cmd\git.exe but when ...
1
vote
1answer
248 views

Rename multiple files, exclude pattern

I want to rename multiple files using the command-line, removing a pattern from the filename while retaining the rest. Original output: $ ls Versailles - Holy Grail (2011) Versailles - Jubilee (2010)...
2
votes
1answer
737 views

Running vim script exits batch file? (Windows .BAT/.CMD)

Trying to run a vim script as part of a batch file with vim -u NONE -S dothis.vim but what is puzzling is that the batch file exits after this line instead of continuing with the next statement. ...
0
votes
1answer
121 views

Removing audio from video file using melt command

I have a video file that I am able to play using command melt video1.wmv I want to construct a melt command to play video only, I dont want audio of video1.wmv I tried to follow manual page of ...
1
vote
2answers
365 views

Stop a “completly hidden batch file”

I'm running Windows 7 64 bit Home Premium. My new internet connection is a bit buggy, and I need to keep reconnecting. To make sure my computer keeps connected while I'm away, I created a script that ...
0
votes
0answers
721 views

Passing Command Line Arguments to EXE

I am using the java jar utility which does not supoort extracting to specific directories via command line argument. Therefore, I need to cd into the folder I want the extracted jar files to go into....
2
votes
1answer
393 views

How to use an image as title using MLT/melt video editing tool?

I'm just beginning to use the MLT/melt command-line tool to edit some pretty simple videos. I found how to join several video clips, how to set a fade transition between the different clips, the only ...