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
3answers
182 views

Bash PS1 string that evaluates certain code every time it is looked up

This question is very similar to this one: Colored PS1 string But I still don't understand completely. So say I have this function function getjobs { echo $(jobs | wc -l) } And my PS1 is ...
3
votes
2answers
361 views

Replace : with \n using sed

I'm trying to output my $PATH in the command line, but also replace the : with \n using the following: echo $PATH | sed s/:/\n/g This doesn't work 100%, how to I get it working?
0
votes
1answer
1k views

How to escape the arguments correctly when calling cygwin bash -c?

I am trying to call the scanimage command (from the SANE tool) from inside cygwin though I think that my problem is one of general escaping so maybe what I am calling doesn't matter. Anyway... The ...
2
votes
2answers
15k views

Disabling Startup Programs and Services From Command Prompt (XP/Vista/7/8)

I need a command that disables all programs and services from starting except the bare essentials. In msconfig this is called a diagnostic startup. I am working on automating a lot of the work I do ...
3
votes
1answer
2k views

taskkill windows command getting hung

I have a few batch files in which I directly call taskkill command to kill running processes (because they interfere with these nightly build scripts). But recently, it seems after some Windows ...
9
votes
2answers
6k views

Telling Vim to use custom .vimrc is easy, but how to tell it to use alternative path instead of ~/.vim?

I can use vim -u filename to use filename instead of my default .vimrc. I am using this method when switching user contexts (su) to use my .vimrc even though running as superuser. How can I achieve ...
1
vote
1answer
463 views

Mac: command line to convert pages document opened in Preview to PDF

Considering that there is no iWork installed and there is no "Preview.pdf" in the pages file package, how do I: convert the pages document to PDF from command line? I can open the pages document ...
1
vote
2answers
2k views

Where are changes made by the PWRCFG.EXE command line utility stored?

Specifically in regards to the below part of another answer, is there somewhere I can manually set/edit what this utility is doing? Powercfg Command-Line Options In the command line you can type ...
1
vote
0answers
30 views

How do i convert a transparent .mov-file to an mp4 file overlayed on a background-image using FFMPEG [duplicate]

I'm trying to convert a mov file with the following specs: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.mov': Metadata: major_brand : qt minor_version : 537199360 ...
2
votes
0answers
648 views

How to reload windows color settings after change of registry key?

I've got a little question regarding the color settings in windows 7: Via Desktop-Right-Click -> Personalize -> Window Color -> Advances Settings I'm able to change the color of the selected items. ...
4
votes
2answers
2k views

Why does Robocopy ignore the /copy flags?

Robocopy Copy Flags? I just recently made an answer here http://stackoverflow.com/a/15211788/891976 where I suggested using robocopy and its /copy flags, but for some as of yet unknown reason, the /...
3
votes
2answers
10k views

How list file by range of date?

I would like to list files with 3 days years old. I found this one at stackoverflow: find . -type f -printf "%-.22T+ %M %n %-8u %-8g %8s %Tx %.8TX %p\n" | sort | cut -f 2- -d ' ' | grep 2012 But I ...
1
vote
2answers
4k views

Possible to continue runas /u:domain\admin cmd with followup commands in the new CMD window?

Is it possible to continue runas /u:domain\admin command with followup commands in a new CMD.EXE window? I tried this but it didn't work: Runas different user to launch CMD and run command What I ...
37
votes
5answers
59k views

How to set an alias in Windows Command Line?

I used to work on bash and benefit a lot from alias. Is there any equivalent way in Windows Command Line? I don't want to simulate a Linux environment, so cygwin is not a choice. I just need some ...
2
votes
1answer
117 views

Linux Utility for “Timestamping” Functionality

wget's timestamping functionality ensures it only downloads files that have changed. I'm looking for a linux command-line tool that will recursively compare a directories contents with a saved version ...
2
votes
1answer
776 views

Set horizontal/vertical taskbar edge position from command line?

Is there a way to set which edge the taskbar is laid out on (either horizontally or vertically to the top, bottom, left and right borders of the screen) via the command line? Workarounds (like ...
2
votes
0answers
129 views

Binding .inputrc on Mac?

On Linux I had this line on my .inputrc: "\C-/": undo which doesn't work on Mac. Is there a way to make it work? On another note, is there a way to bind command keys on inputrc?
0
votes
0answers
56 views

what parameters are needed to join 2 or more urls inside a bookmark in firefox? FF19

this: Create a desktop shortcut for a group of bookmarked tabs in Firefox? @echo off start "superuser" "www.superuser.com" start "google" "www.google.com" Add more "start" lines as appropriate. Save ...
1
vote
0answers
303 views

Odd Win7 connex issue (WinSCP, puTTY, FTP command line)

I have searched in many forums and Google and have not seen anyone else mention this issue. So I hope I just missed it and someone can help. This issue I am encountering is this: Whether I use WinSCP,...
2
votes
0answers
804 views

Windows Command line way to get network usage of a process

I would like to get the network usage (in bytes or KB) of a specified process through the Windows command line (I'm using Windows 7). Also if its possible to get a list of all running processes with ...
6
votes
3answers
3k views

'cd' command in terminal - using partial folder name

If I want to navigate inside folder with long hard-to-type name, is there way to use 'cd' with some kind of shortened name of this folder, to get free from unnecessary work?
1
vote
1answer
1k views

“command not found” after editing /etc/profile

I followed this tutorial to add a JAVA variable for all users. I then opened the editor that my hosting service supplies and added the last 2 lines. Centos 5.9 server. # /etc/profile # System wide ...
1
vote
1answer
390 views

PowerShell in conEmu has different PATH from cmd

Why does PowerShell on conEmu have a different PATH from cmd? I see this when I do openssl version in PowerShell I see that 2007 version and in cmd I see the 2013 version.... This is my startup ...
0
votes
2answers
171 views

Git Install only command line tools

I need to install git and command line development tools as 'make' or 'cc' to install rbenv and Ruby. Is 'Command Line Tools' package enough ? I do not want to install XCode if is not necessary.
1
vote
2answers
829 views

Open chrome and launch the settings page

Does anyone know how to launch chrome and immediately open a "chrome url"? I'm trying to make a shortcut like this, but its not working when I tried. it only accepts http:// urls ...
2
votes
0answers
342 views

Imagemagick batch converting memory overload

I must to convert about billion of images from jp2 to jpg... I create such .bat for /d %%d in (*) do ( for %%f in ("%%~d\*.jp2") do ( convert -limit memory 0 -limit map 0 "%%~ff" -quality 25 "%...
0
votes
1answer
775 views

Need a script to calculate batch file execution time

I need a script that I can call/include from another batch file (.bat) that can calculate the amount of time it takes to execute the first batch file. The script would be used for automation on both ...
1
vote
1answer
430 views

Not able to access a Windows 8 binary from the command prompt even when PATH is set properly

I am currently seeing a weird problem in Windows 8 installed on my laptop. I have copied "apache maven" to the C:\Program Files\Apache Software Foundation folder. I have set the JAVA_HOME, M2_HOME ...
3
votes
2answers
2k views

Can Mingw32/Msys run dos/cmd.exe executables without screwing up the arguments?

I'm trying to run growlnotify.exe from a Windows bash prompt. Recompiling it for mingw32 isn't a good option for me. growlnotify works if I use it from the cmd prompt, but it fails (mostly) from the ...
3
votes
3answers
2k views

Automatically extract and rename extracted file according to archive's name

I have a bunch of zip files in a folder. Each zip file has a file in it named exp_1.txt. I would like to unzip each zip file and rename the extracted file from each zip file to what the zip file was ...
0
votes
1answer
178 views

MsysGit gets differend look&feel depending on, how it is called

When I start msysgit (C:\msysgit\msysgit\msys.bat) from its directory, it has an other visual settings, as when I start it over a shortcut in the Quick Launch. Why? How can I change it?
2
votes
1answer
24 views

Define 0 folders found to execute a subprocess

How can I define that 0 (number zero) folders are located within the current directory?. I´m asking this due to within a batch program, I cant make that this condition be true in order to go to ...
2
votes
6answers
835 views

How to execute the output of `ls` from the command line?

Sometimes I forget my relative paths and by the time I track down where the file, is I have typed : Cris-Mac-Book-2:weird cris$ ls ../../../ Icon? Research Support Cris-Mac-Book-2:weird ...
0
votes
1answer
2k views

How to format CDROM using Windows 7 from the command prompt

I'm currently using Windows 7 to create multiple copies of CDROM using a batch file. I could automate the copying of files but I'm not able to find out how to format the CDROM from the command prompt....
0
votes
0answers
4k views

Windows 7 How to create a new account from command prompt?

My computer was damaged (Windows can't find Desktop path/profile after Hard Drive Repair) and now I can't use my administrator account because I get this message: Failed to connect to a ...
6
votes
1answer
3k views

Pipe not working in cmd.exe on Windows 7

I have started seeing some very strange issues with the pipe command not working on Windows 7 64-bit on my machine. Commands like this: echo test | more used to work without a problem, but now ...
2
votes
3answers
16k views

Continuously copy all file changes from one folder to another on change (Windows)

I'm working on a massive Java web application which is kept under centralized version control, but the source files are used to build and run the actual server, which then copies all the files I work ...
1
vote
6answers
2k views

Windows command-line: How to copy subdirectories, not files, under a given root dir?

I have a file hierarchy like this: RootDir /A /fileA.txt /B /C /fileC.txt /fileB.txt /otherFile1.txt /otherFile2.txt I'd like to copy only the subdirs (i.e. A, B) and ...
0
votes
1answer
555 views

speed python script on command line vs launched in IDLE shell

I noticed several times that a simple python script (with some straightforward algebraic computation in a loop) runs considerably faster (up to a factor 6) when launched on a shell command line as ...
0
votes
1answer
912 views

Extracting images from video in 1 minute intervals

I would like to extract images from a video Exp01.avi, the video is 24fps and 25 minutes long. I want the images to be extracted from the video after every 1 minute interval. Please someone tell me ...
0
votes
1answer
749 views

Using Mac OS X `at` to schedule a daily task to clear out .Trash folders

How do I use the OS X at command to schedule a daily clean-up of the user's .Trash folder? I'm thinking something along the lines of: rm -rf ~/.Trash/**/* | at 0:00 + 1 day Will this clean the ...
1
vote
1answer
278 views

CMD Choice high-range characters

As a test, I tried this: C:\Users\Kolink>choice /C ` ERROR: Invalid choice. The valid choice characters are: a-z, A-Z, 0-9 and ASCII values of 128 to 254. How exactly would I add ASCII values ...
0
votes
2answers
883 views

how to download afile that is behind CGI request using CLI?

I want to download a mp3 file from an online course. But the file is behind a CGI redirect. The URL is: "http://openmedia.yale.edu/cgi-bin/open_yale/media_downloader.cgi?file=/courses/fall08/chem125/...
0
votes
0answers
25 views

Automated Command in unix [duplicate]

This is probably very stupid and easy. I don't program for BSD or anything. I would like my mac to simply run 1 command line in unix when it boots. I need a service started and would like to ...
0
votes
0answers
54 views

Linux command line: run mon nice and C exectuable together

I'm trying to run ./a.out, but monitored (using mon) and nice'd to highest priority. Here are the commands separately: nice -n -20 /home/pi/a.out //works fine mon /home/pi/a.out //works fine ...
0
votes
0answers
537 views

How to change Recycle Bin settings from the command prompt?

Is it possible to change Recycle Bin settings from the command prompt or using VBScript? Specifically, I want to: Select the "Don't move files to the Recycle Bin, Remove files immediately when ...
0
votes
2answers
280 views

Replicate user action in Windows?

Is it possible somehow to record user action fully and replicate it on any other machine? Not just repeat user input (key press, mouse clicks/movement), but capture actual system "objects" (e.g., GUI ...
3
votes
1answer
336 views

How can I print two small files on the same page with a2ps?

I'm using Ubuntu Linux 12.0.4.1 LTS and I like the auto-formatting that a2ps does. I just want to print several small files using as few pages as possible. Example: a2ps file1.c file2.c file3.c file4....
1
vote
1answer
2k views

Windows command prompt freezing on focus

I have a few python scripts which contain no pause commands and no prompts for user input however I find that when I change my window focus to the Windows cmd window the output will freeze until I ...
0
votes
2answers
340 views

Is there a way to detect why a command line task like rm is still not done after several hours on mac os x?

I was trying to get Time Machine working again on my OS X 10.7 (Lion) powered iMac, and a remote drive on airport base station, and the only solution that worked was the rename my .sparsebundle file ...