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
1answer
12 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 ...
-4
votes
0answers
18 views

How to undelette files/Folders with icacls on command line? [on hold]

For a developpement of an application, i need how unable formating of the flash drive where the app is copied, without (Readonly of diskpart) or if is it not possible, the good command line to execute ...
0
votes
1answer
18 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
20 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
23 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
27 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 ...
-4
votes
0answers
33 views

Difference between Linux and Windows [on hold]

This might also sound like a discussion, but I am interested in some quality and straightforward answers, so I hope my post is OK to be here. I "moved" from Windows to Linux some months ago and the ...
-1
votes
0answers
11 views

HYDRA_PERMISSION_RESTART argument on running executable

Recently, I discovered strange behaviour on my mom's laptop. I tried to install Utorrent, when I tried to run the executable UAC prompt and dimmed the screen. Previously I set the UAC not to dim the ...
0
votes
1answer
30 views

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

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
60 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
23 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
26 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
11 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
20 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 ...
1
vote
3answers
35 views

Bash script to find all folders containing a specific file and copy a new file to those folders

I'm trying to write a script that will loop through all subfolders of a directory to search for a specific file and then copy a new file to those folders that contain that file. This is what I have ...
1
vote
0answers
22 views

The Command “copy /b Source+,,” does not work in a Batch Script

I'd like to update the timestamp (Modified Date) of a file in a batch script by using the following command "copy /b Source+,," but it does not work. I tried the same command through command line ...
0
votes
2answers
41 views

Change Windows Desktop Background command line

Is there a command line option to change the Windows desktop background color? I want to set my desktop background to use Solid Colors (blue - rgb: 57, 109, 166) with no background image. The only ...
0
votes
0answers
8 views

Command Prompt set UTF8 not working after opening specific directory

I'm trying to automate opening up PSQL (PostgreSQL command prompt). I've got the batch program opening the correct directory however I'm not sure how to get it to run the command to switch to UTF8 ...
0
votes
2answers
22 views

Linux slightly different behaviour If we give '&' before io redirection '>' and after redirection

I was starting jboss recently in background in Linux and saw that if you run command as follows: nohup ./startjboss.sh > server.log & Output is : [1] 18835 [root@cnt5-01b downloads]# The ...
2
votes
1answer
45 views

Changing Visual Effects settings through command line

Is there a way to change/modify the Visual Effects settings via command line? For example, I want to control (enabling and disabling) on Animate windows while minimizing and maximizing option from ...
0
votes
2answers
25 views

How do I restore my command prompt/power shell to default settings?

I took a java class a few semesters ago, and in order to do things like compile the code, they had us modify a number of things. I wasn't paying attention to what I was changing and I no longer have ...
0
votes
2answers
39 views

giving permission to program to run with out confirmation in start command windows

I am using this start /b C:\wamp\wampmanager.exe command to start a program in my windows( Windows 7 Ultimate - 64 bit). But then the program want a permission to run Do you want to allow the ...
0
votes
1answer
24 views

How can I run this Perl script in Windows?

I am trying to run a PERL script for the first time. Here it is : http://search.cpan.org/dist/HTML-ExtractMain/lib/HTML/ExtractMain.pm I have never used or worked with PERL before and I am finding ...
-2
votes
0answers
16 views

Windows Batch script, how do i return only the last item in a list variable? [closed]

In short I need to pick the last item from a list variable, not knowing how many items the variable contains. If my list variable has 4 items, i need the 4th, if it later that day has 5 items, i need ...
0
votes
1answer
25 views

OSX bash command line countdown timer

I found here on superuser the following nice countdown script that I could include in my .bash_profile: function countdown(){ date1=$((`date +%s` + $1)); while [ "$date1" -ne `date +%s` ...
0
votes
2answers
35 views

windows scheduler that runs every x minutes daily in the command line

Is there a way to schedule a task (.bat) through the command line that runs every 5 minutes daily? I also want it to run even if the user isn't logged on. What is the exact command line syntax?
0
votes
1answer
33 views

Does command line pick up a proxy server from Internet properties toolbox?

Recently my company proxy server, through which all the internet traffic is directed, was disrupted and internet services were down. Surprisingly though (for me), I was still able to ping google from ...
0
votes
1answer
21 views

What is the best way to auto run scripts and/services on Raspberry Pi (raspbian)?

I'm working on creating a headless media server out of my Raspberry Pi and there's a lot of junk that has to run on boot to make it useful. My question is what's the best way to run scripts in this ...
0
votes
0answers
17 views

Use existing explorer.exe instance when calling from batch file - Windows 7

In my batch file, I am calling a new Windows file explorer at a specific location by using the following: echo off explorer.exe "C:/Users" The user then navigates to other folders as needed. Then, ...
0
votes
2answers
46 views

Using cmd to edit reg keys?

I need to edit 2 registry keys in Windows 8.1 but make it in a way to be able to use them in a batch file to be able to use them on more than 1 PC. In the batch file I will have more reg key's that ...
0
votes
0answers
4 views

Run ATPDraw to perform simulation to all *.acp files in a folder

I would like to simulate *.acp files on ATPDraw, but instead of opening one, pressing F2, clisong it, opening another... I would like to use some batch way, perhaps through commandline. I tried to ...
0
votes
0answers
12 views

Send and receive file in curl

I have a remote server running and i want to send a text file to that server. I have this script to upload the file: curl -F 'txtfile=@sometxtfile.txt''http://www.example.com/transfers' My ...
0
votes
0answers
17 views

Batch conditions and variable

I have a question about variable and batch windows. The main goal is : I have files in directory (pattern 0? with ? a number between 0 and 9). First I create a %%nf.bat (filename of each files) ...
0
votes
1answer
17 views

Variable and Conditions with Batch Windows

I would like to make a batch. The goal is simple : For all files with DSW xtension If my filename contains VU1 so variable1=2 and variable2=2 If my filename contains VU2 so variable1=20 and ...
1
vote
1answer
32 views

Preventing my pc from being shut down remotely

In my college, we use Microsoft Server 2008, and each student has their own account. In my class, students discovered that they can remotely shut down each other's PCs using cmd (the fact that we ...
0
votes
2answers
36 views

Using piped output as filename in cmd

I want to uses pipes to redirect the output of one program to another like: type file.txt file2.txt | sort | someprog Now I've the problem that someprog isn't able to use the piped STDOUT and wants ...
0
votes
0answers
22 views

Mounting EBS volume on Ubuntu 12.04 taking long time

I have written one shell script which Checks if volume has file system on it or not Formats the volume with ext4 if no file system present Creates mount point directory Tries to mount volume using ...
0
votes
1answer
24 views

Batch file that sets a variable equal to the drive letter of first removable disk found

I want to write a batch file such that when I run it in cmd, it sets a new variable equal to the drive letter of my usb flash drive (if, of course, it's the only storage device of that type). Assume ...
-2
votes
1answer
20 views

DOS command-line query returns too many results

Can anyone tell me why dir *.asp returns all .asp files but also all .aspx files? It seems dir ignores extensions longer than three. This is really bugging.
-1
votes
1answer
26 views

7Zip Zipping up directories

I want to use 7 zip to compress and archive folders but I want it to exclude existing .7z files if they exist and not duplicate them with a .7z.7z ext I found this but it duplicates the already zipped ...
0
votes
1answer
16 views

Looking for bash command to recursively find and copy only files from one dir hierarchy to another

Is it possible to run a command using bash that will replace all the files in one directory structure with all the files in another. For example, if I have these two directory structures: dest dest/A ...
0
votes
1answer
23 views

Long commands typed in bash overwrite the same line

Since We updated Bash to 4.3.27 when I type a long command, if it reach the end of terminal window, instead of continuing in a new line, it overwrites over the same line using a ">" at the beginning ...
0
votes
0answers
27 views

Syntactic differences in cp -r and how to overcome them [migrated]

Let's say we are in a blank directory. Then, the following commands: mkdir dir1 cp -r dir1 dir2 Yield two (blank) directories, dir1 and dir2, where dir2 has been created as a copy of dir1. ...
0
votes
2answers
26 views

Why redirecting FINDSTR output produce UNIX line ending?

When I issue this command: FINDSTR /I /N "<sdk:extra>" addon.xml output is: 973: <sdk:extra> 995: <sdk:extra> 1017: <sdk:extra> 1036: <sdk:extra> 1057: ...
0
votes
1answer
17 views

Storing info from wmic as variables in command prompt (Windows 7)

I'm trying to write a batch file that copies a folder from my flash drive to the desktop. I want the batch file to achieve this on any pc in my college. the command wmic logicaldisk get ...
8
votes
2answers
567 views

Open the folder associated with the Command Prompt's working directory? [duplicate]

I am wondering if there is a command one could type into The Windows Command Prompt which would cause Windows Explorer to open a folder set at the Command Prompt's current working directory? (This ...
1
vote
0answers
17 views

Windows 7 text input/graphics repainting in random areas

In the past few months I've been encountering this issue where the line of text being typed in the command prompt window reappears in a random place on screen and paints over whatever was previously ...
1
vote
1answer
34 views

WinRar - Custom shell commands

i'm trying to create custom commands on the context menu in windows. i found this great registry hack here: https://superuser.com/a/376879/395548 this is the code made to work for me: Windows ...
0
votes
0answers
21 views

Silent uninstall with the Flash Player Uninstaller

I am using this tool to uninstall broken Flash installations on Windows 7. I would like to known how it can be run silently from command line. I was able to find to some answers to this so I known ...