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
37 views

Windows CMD equivalent of CTRL+X and CTRL+V

I know how to copy/move files in windows CMD. I use robocopy. But I want to move one directory from location A to location B immediately. Both locations are on same partition: source: I:\actual ...
1
vote
1answer
58 views

Need Batch File to close a Window.. NOT the batch window

Complete novice here so please forgive if the answer is obvious. I have a batch file that does the following. Starts program 1 Waits 3 seconds (I have to click a button on program 1 after it opens) ...
1
vote
1answer
51 views

Delete multiple lines if one line contains certain string in notepad++

I have multiple lines for my website and now I want to clear up a few of them. Is there a way I can mark (or atleast delete) groups of lines that all contain a certain string? For example. ...
1
vote
1answer
27 views

NoMethodError with Ruby when installing SoundCloud 2000 client for CLI

I’m trying to install SoundCloud2000 on my MacBook running Mac OS X 10.8.5. I have Ruby 2.2.0, mpg123, and portaudio installed. Installing SoundCloud 2000 as a GEM seems to work fine: gem install ...
0
votes
0answers
22 views

Running command in background isn't working as expected

This is probably relatively easy for anyone who is more into linux than me. I have the following command, to run a PHP process on background: /usr/local/bin/php -r ...
0
votes
2answers
54 views

Get the location of httpd.exe in CMD

When we start the Apache in windows machine httpd.exe start its process.Now we can determine if httpd.exe process is running or not using this command: query process httpd.exe This will return ...
0
votes
2answers
41 views

Windows command line: how to “Replace all child object permission entries with inheritable permission entries from this object”?

I need the same effect of the checkbox "Replace all child object permission entries with inheritable permission entries from this object" (directory->Properties->advanced in Windows Explorer) from the ...
0
votes
0answers
30 views

Ubuntu terminal : cd directory returning directory name with backslash.Why?

I have got only one folder named "My_Folder" in my home directory.When i use terminal to change directory: cd My //after entering My when I press TAB this returns... cd \My_Folder/ It changes ...
1
vote
1answer
52 views

Exit /b 0 does not set %errorlevel% to 0

I have a weird behavior wrt setting errorlevel in a batch script to 0. I am calling a batch script a.bat on a Jenkins job, which in turn calls a second script b.cmd and evaluates the errorlevel after ...
0
votes
2answers
31 views

bash: How to use a quoted argument in select

From a command I get some arguments that I want to offer to the user with the select statement from bash in a shell script. The arguments supplied by the command may contain spaces and are therefore ...
1
vote
1answer
32 views

How can I use the pipeline output from different commands inside a custom bash script?

I have this simple script: #!/bin/bash # This command removes the last "\n" (line feed) character from the file specified as parameter # # Params: # $1 [FILE_NAME] - the name of the file to trim if ...
0
votes
1answer
26 views

for loop stops batch script

ok so been playing with this script and for some unknown reason it always crashes out (exits the prompt) when the script reaches the for statement, however if i simply copy and past these commands one ...
1
vote
1answer
34 views

Wrapper for Windows command line tool

Using Windows 7, I want to write a wrapper for some command line tools to simplify their usage. Say I regularly use this executable with following options someTool.exe -i infile -a option1 -b option2 ...
1
vote
1answer
46 views

How do you swap the primary mouse button via commandline in Windows 8?

I've tried RUNDLL32.EXE USER32.DLL,SwapMouseButton But it doesn't work, even when run as administrator. My goal is to make a .bat file that I can call via my fancy shmancy new mouse I bought that ...
0
votes
1answer
15 views

Which program provides “lpquota” command?

At many universities, you can buy a printing contingent which allows you to print out a certain amount of pages. At the Linux terminals, students can check their current printing contingent by ...
3
votes
3answers
168 views

how to select nth result on command line without using mouse

I got this alias for searching for a file recursively and case insensitive type fr fr is aliased to `find . | grep -i' and so let's say i'm searching for a file fr nsstring+util ...
2
votes
2answers
39 views

Executable lauches if called directly from terminal, but does not work when called from shell script

I have downloaded some software (called samtools) and it is stored in a folder on my desktop. Then I've added the path to the executable into the PATH environment variable. In other words my ...
4
votes
1answer
97 views

Force Windows use .EXE on PATH rather than CMD.EXE internal command

When I execute a command with the same name as an internal command, instead of searching in the path Windows simply uses the one found in CMD.EXE. For example, mkdir is an internal command built into ...
0
votes
1answer
37 views

Rename a file and add a part of the file as the suffix of the file [duplicate]

I have file names like: A_20141001_20141224.txt A_20141002_20141224.txt B_20141001_20141224.txt B_20141002_20141224.txt C_20141001_20141224.txt C_20141002_20141224.txt I want to rename them to: ...
0
votes
2answers
38 views

cmd prompt turned from window mode to full screen mode, please provide a solution

I was working on cmd and certainly I made changes in properties from window mode to full screen. Now every when I open a new window or existing one using win+r [cmd] I am only getting a full screen ...
0
votes
1answer
34 views

CMD - Successful or not indication?

Suppose I have some commands in a bat file : echo 1 copy existingFile1 c: echo 2 copy existingFile1 notExistingDrive: echo 3 attrib -r attrib notExistingFile Those are just demos of commands that ...
1
vote
1answer
37 views

bash script processing files with bad characters

I received a zip file with a folder structure that include parenthesis. I've worked through two processes at the cli and now merge them into a script The first searches through the file structure for ...
0
votes
2answers
41 views

Force Verbose Mode in Windows DEL Command

I sometimes delete masses of files on multiple computers with the Windows command line, with the DEL command, and on some the function is verbose (i.e. outputs the files it deletes as it goes), while ...
1
vote
1answer
129 views

Checking firefox version using cmd and gives error

On checking the version of firefox using firefox -v, I get the following error. (process:12746): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed Mozilla Firefox 31.0 I ...
0
votes
1answer
65 views

How to full screen command prompt in a Virtualbox XP vm?

I am running a legacy DOS application in windows XP command prompt and I can't manage to show it full screen. As I saw, this is not only my DOS app, but every command prompt I open in Windows vbox, ...
1
vote
0answers
22 views

Interpolate File Contents Into Command Argument Used in Puppet Manifest

I have a SQL command that I would like to use as the value of a JSON node, which is a part of an index definition. All of this is passed as a command in a puppet manifest. I would like to ...
1
vote
1answer
23 views

Linux command line/app to compare sets of folders against one another

I have many photos organised in folders. I also have an "Uncategorised" folder for photos before they are organised. I've found that many (but not all) photos in Uncategorised have now been organised ...
1
vote
1answer
38 views

How to get different prompt look for root and regular user

My .bash_profile has different styles of prompt for regular user and root but in order it to work the .bash_profile should be reloaded every time I switch users. How can I achieve this? Can I make ...
0
votes
2answers
49 views

find /data/oozie-admi/ -type d -ctime +1 | xargs rm -rf [0] command deleted /data/oozie-admi/ folder

/data/oozie-admi/ folder contains multiple directories. This command find /data/oozie-admi/ -type d -ctime +1 | xargs rm -rf [0] deleted /data/oozie-admi/ folder . Need to find out scenarios in ...
0
votes
1answer
53 views

How to install ffmpeg on OS X? [duplicate]

You can get the binary here http://ffmpegmac.net/ How do I install said binary to use it as a commandline tool. I have a mac, with mavericks. If possible, it would be nice to install it without the ...
0
votes
2answers
44 views

Command “find” -exec replacing string

I'm trying to find JPG files in a folder tree to execute the command "" to transform it to PDF. The problem is that the code I am running leaves the file in the same directory and I want to move it ...
1
vote
1answer
35 views

mkdir -p is “ambiguous” what should I do?

When I type in "mkdir -p" windows powershell spits out that the parameter p cannot be used because it is ambiguous, any idea what I am doing wrong? Thanks
0
votes
0answers
19 views

Insert blank lines when using 'tail -f' in cmder

I recently switched from Cygwin to cmder mostly due to it's awesome interface and all that cool pre-configured stuff. ( http://bliker.github.io/cmder/ ) I am using tail -f very often and when I am ...
-3
votes
1answer
39 views

How can I get a win 7 batch file to output a list of unique filename prefixes?

I have the following files in a folder MyDocuments 2014-10-10.zip MyDocuments 2014-10-09.zip MyPictures 2014-10-10.zip MyPictures 2014-10-09.zip Ideally I would like the output to show MyDocuments ...
0
votes
2answers
47 views

how to run a batch recursively

I have a parent folder (BIG_Folder), which contains many subfoldes (folder1, folder2, folder3 ...) in each subfolder a batch file exists, it is always the same (x.bat). I want to run all bats, ...
0
votes
2answers
25 views

How do I copy a file with accompanying symlinks in Linux?

Expected scenario: $ ls -lh /lib/libcurl.so* lrwxrwxrwx 1 root root 16 Mar 26 2013 /lib/libcurl.so -> libcurl.so.4.0.1 lrwxrwxrwx 1 root root 16 Mar 26 2013 /lib/libcurl.so.4 -> ...
0
votes
0answers
26 views

OS X: How to call “Service” through command line?

I'm looking for a way to call "service" actions (In Finder, I can right click a file and find them on the bottom of the menu, see below) Through command line, is there any way to do it? Thanks in ...
1
vote
1answer
38 views

Why executing “cmd /k” after connecting in a ssh server using putty makes the keyboard stop working?

I am using FreeSSHd in a Windows Server 2003 x64 and putty to connect to that ssh server from a Windows 7 x64 machine. In the "Remote Command" of the putty interface I put cm /k "cd c:\". Everything ...
0
votes
1answer
14 views

Type file content, pipe some actions and put result back

Is there way to do something like thas: cat somefile.txt | sort | uniq > somefile.txt I.e. I want to list entire file, then pipe some actions to its content and finally put result back to source ...
0
votes
1answer
36 views

Up arrow in gnome terminal to review command line history ignores commands with leading whitespace. Is there a workaround?

When writing python code (using gvim) I often keep complex command line commands for test cases saved in my docstrings. A common time-wasting error I make is copying the entire line from the python ...
2
votes
1answer
33 views

I have a batch file that echos multiple lines. I would like to output it into the file but the file only shows 1 line

This is what I have: SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION @echo off set num=0 set "suffix=" for /f "delims=" %%s in ('dir /b /a-d /o:gen') do ( if /i "%%~xs" equ "!suffix!" ( set ...
1
vote
1answer
40 views

How fix when cmd prints command instead of run it?

I am trying to automate chef setup for windows. So I wrote .bat according to this: call winrm quickconfig -q call winrm set winrm/config/winrs @{MaxMemoryPerShellMB="300"} call winrm set winrm/config ...
0
votes
0answers
17 views

Is there cli add on for windows explorer [duplicate]

Just like you can open chrome console under website, is there one for windows. There are things that you can only do in cli, and there are things which are far easier in gui of explorer. So is there a ...
0
votes
1answer
33 views

What does `-n` option in sed do?

This is the man page entry for -n: -n suppress automatic printing of pattern space I notice that when not using -n for certain operations, each line is printed to stdout (and the requested ...
0
votes
1answer
35 views

How do I decode `mailto:` link to more readable form? [closed]

Is there a simple tool that just dumps the content of a mailto link to console? $ decode_mailto 'mailto:a@b.c?subject=qqq&body=www%20eee&' To: a@b.c Subject: qqq www eee
1
vote
1answer
67 views

What does %Path% mean at the end of PATH?

My PATH on Windows looks like this: C:>echo %PATH% C:\WINDOWS\system32;C:\WINDOWS;C:\dwimperl\perl\bin;C:\dwimperl\perl\site\bin;C:\dwimperl\c\bin;%Path% What does %Path% mean at the end of ...
0
votes
1answer
35 views

Batch file to search for a file, then delete that and the parent folder

Basically I need to search the folders within C:\Windows\ccmcache and search for adobe cc.msi and then delete the entire contents of that directory This is what I already have @echo off set ...
0
votes
0answers
30 views

Shell command shortcut using input filename as output filename

Hi could someone help me with a little command shortcut please? Im trying to run an ffmpeg command and was wondering if there was a shorter way to type it, Ive been reading up on parameter expansion ...
0
votes
0answers
13 views

Defining git commands on windows

I have a script that I use to add some functionality to git. For this particular case I cannot do it with an alias. The name of the script is git-cim. In linux if I place this script in my path and ...
0
votes
1answer
84 views

LFTP: SSH with private and public keys

I'm using LFTP in order to mirror SFTP server folder with local folder. But currently I'd be glad to correctly connect to SFTP server and list contents... I'm using Windows 7, and I've downloaded ...