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

generate a list of devices installed in a PC through command line

I want to generate a complete list of devices and drivers installed in a PC which includes the serial number or id of the device through the command line driverquery /v /fo csv > drvlist.csv i ...
2
votes
1answer
3k views

How to add files to specified folder in archive with 7zip command line

I have folders and files on my disk C:\builds\main.exe D:\components\a\testa.exe D:\components\b\testb.exe D:\components\c\testc.exe D:\dependencies\abc.dll Can I create an archive with 7z command ...
2
votes
7answers
69k views

run exe from command prompt

How do I run a .exe file from the command prompt? For example, if the .exe file is located at C:\file.exe, how do I run this file when the prompt is currently in another location like D:\?
0
votes
2answers
250 views

Why does XMLStarlet return additional whitespace/newline for XML text nodes?

I'm trying to manipulate XML data with XMLStarlet for translation purposes as asked in Translate text nodes of GraphML XML (CAS)? but although the nodes I am trying to read are returned, there is ...
1
vote
1answer
21 views

Alternative to “fc -s” in zsh?

In bash, I had a handy alias: alias r="fc -s" Which just repeated last command. Same as !!. I am now used to it (muscle memory), but I can't seem to figure out how to recreate the alias. fc doesn't ...
1
vote
2answers
4k views

How do I create seperate 7z files from each selected directory with 7zip command line?

FOR %i IN (*.*) DO 7z.exe a "%~ni.7z" "%i" Does the job for each selected file. However I've got tons of directories (with files inside them obviously) I need to pack. Say I have d:\dir1, d:\dir2, ...
0
votes
1answer
33 views

Bash script via ssh does not have $PATH

I'm trying to run bash script via ssh. To do this I run command: ssh me@server 'bash -s ' < script.sh The problem is that when I run script like this I don't have my $PATH variable (i.e. if I ...
0
votes
0answers
22 views

How can I start a batch script before open some type of file?

I'm writing some custom lock file system for my company. I want to start my lock_engine.bat before open some type of file. for example here my bat: @ECHO OFF set FILENAME=%~nx1 echo. is locking ...
-1
votes
0answers
46 views

Windows 8.1: The User Profile Service service failed to sign-in [closed]

I was using my computer this morning and everything was working normally, then I shut it down and I then after a while, I came back and booted up the computer and after typing in my password, the ...
5
votes
1answer
2k views

How to Kill Java Process in Windows, without killing java.exe through command line?

I need to kill the process activemq-all-5.5.1.jar(....\app-launcher\target\lib\activemq-all-5.5.1.jar). I use taskkill /im java.exe, but it kills all other applications related with java. I need to ...
0
votes
0answers
18 views

Zpaq does not accept option “method”

I am trying to run the command: box:~/experiment# zpaq a out out.m4v -method 5 This should compress out.m4v to the file out using the method 5 but instead I get the error. -method: No such file ...
3
votes
3answers
17k views

Delete registry key or value via a CMD script?

How do I edit an already-in-production .cmd script file, in order to have the script delete a certain registry key in the Windows registry? Firstly, is this even possible, and secondly (if that's not ...
6
votes
2answers
138 views

What does combining compression methods in 7z actually do?

The 7z command-line tool lets you specify multiple compression methods, e.g.: # 7-zip archive type, strongest (9) compression, methods PPMd, BCJ2, LZMA2 $ 7z a -t7z -mx=9 -m0=PPMd -m1=BCJ2 -m2=LZMA2 ...
0
votes
2answers
2k views

sort utility on the command line

Need a free command-line utility to sort a big flat file (>10Mb) on fields at specific position. A few years ago, I was using something called bigsort.exe on OS/2 but I can't find something similar.
2
votes
2answers
310 views

How should I mass rename files to fix Dropbox (false) detected “conflicting” version to “non-conflicting” version?

I have a project with many files, located in several sub-directories. Dropbox somehow replaced the latest versions of some of those files with an old version and renamed the latest ones by adding " ...
2
votes
2answers
67 views

How do I investigate commands being run when changing directories?

I see “awk”, “find”, “sed”, and “which” momentarily appear in my Terminal window's title when changing directories.  (And not all of these always appear and there could be some I'm missing; I imagine ...
6
votes
5answers
11k views

Can I launch URLs from command line in Windows?

Can I launch URLs directly from the command line in Windows?
0
votes
1answer
41 views

sed: What does exit code 2 mean?

Case I am trying to replace all occurrences of <value>*</value> into <value>file:\\</value> in a designated file test.txt. I work on Windows and use sed I have installed with ...
2
votes
3answers
14k views

cp: reading `filename': Input/output error WHY?

I wish to know what could be the possible cases for this error: cp: reading `filename': Input/output error I am getting this message when I am trying to copy a big file of around 50MB.
9
votes
6answers
5k views

Right align part of prompt

I am sure that I have seen someone have a part of their prompt aligned to the right in their terminal window and then have the actual cursor start on a second line. I know that I can achieve the ...
0
votes
2answers
19 views

Is it possible to launch Firefox with a set of add-ons using command line?

I'm looking for a way to launch Firefox with a set of specified add-ons using command line. E.g. $ firefox --plugin-list=/home/user/addons/quickjava-2.0.4-fx.xpi,\ ...
1
vote
2answers
51 views

CMD delete specific files and log all output

Hi guys ive written a script for a school im working at to automatically mount a folder as drive X: and then to go into drive X and recursively scan all folders and sub folders for .bat .cmd .exe and ...
1
vote
1answer
13 views

Add text via command line inkscape

I'm attempting to write a script that adds text to an svg image at a certain location. I'm aware that Inkscape has a very robust command interface but there doesn't seem to be much in the way of ...
1
vote
1answer
24 views

Use 7z to backup each sub-directory to a separate file

My file structure is: c:\csdata\folder1 c:\csdata\folder2 c:\csdata\folder3 etc I'm trying to use 7z to backup all folders in csdata to their own archive to a temp folder (C:\butemp). Here' what I ...
3
votes
1answer
54 views

Using grep on URLs not working

I've got a couple of text files (a.txt and b.txt) containing a bunch of URLs, each on a separate line. Think of these files as blacklists. I want to sanitize my c.txt file, scrubbing it of any of the ...
1
vote
1answer
468 views

Edit files from a batch script

How would I edit a file from a .bat file that changes the contents of a file located somewhere on the hard drive. For example there is a file on my desktop, can I make a .bat script that will add a ...
0
votes
0answers
27 views

Replace “open command window here” to open git sh.exe bash

Is there a way to replace the default option in windows context menu to open command window in the current directory to open git's sh.exe bash in the current directory?
1
vote
2answers
132 views

bat file behaves differently when run from windows scheduler

I have a .bat file S:\BACKUP_db\copytofileserver.bat, which takes some files and zip them to the network drive. Its first command is to delete the old backup at specific network path, then pack the ...
9
votes
3answers
12k views

List files recursively showing only full path and file size from Windows Command Prompt

I am trying to generate a text file containing the filename (including full path) and file size for all files in a particular directory and any of its sub-directories (i.e. recursively). Ideally, I ...
0
votes
1answer
30 views

How do I get Google search request completion suggestions from console?

When one starts typing a search request on Google search page, Google shows a dropdown with some popular completion suggestions. There are often useful or funny things there. How do I get that list ...
43
votes
12answers
48k views

How to start GUI linux programs from the command line, but separate from the command line?

I've searched for this before, but have never been able to find an answer. In Windows, if I have a console window open, type winmine, and press enter, Minesweeper will appear, completely separate ...
14
votes
4answers
39k views

Windows: List files and their permissions (access) in command line

In linux, ls -l lists files permissions, like this: -rw-r--r-- 1 user user 924 2011-07-01 20:23 test.txt In Windows, commands tree and dir don't have the options to list permissions. How is ...
0
votes
1answer
74 views

Windows Batch File (WMI) - taskkill process based on memory usage

Is there a way using WMIC, bat files, or powershell, to kill a task with a particular task name if the amount of virtual memory the process is using is above a certain limit? Specifically I want to ...
5
votes
2answers
2k views

How to force short name (8dot3) generation?

I have a problem with windows windows shortnames. Sometimes the short names do not seem to be generated for "Program Files" and "Program Files (x86)". I verified that short name generation is enabled ...
0
votes
1answer
34 views

how to find all files under directory different directories

How can you find files name 'xyz' under directories name 'abc'? something like this....but its not working. find . -type d -name 'abc' -exec find {} -type f -name 'xyz' \; find . -not -path 'abc' ...
0
votes
1answer
14k views

How to create a batch file that will run cmd and a exe with parameters

How to create a batch file that do following: For example program name is hi.exe will do the following: Run hi.exe in cmd with arguments hi.exe -f%l%. Instead of %1% I want user to input the ...
0
votes
0answers
14 views

System & Security Messages

I'm currently setting up computers and have been requested to disable the System & Security messages (the little white flag next to the time (bottom right)). Doing this manually for every computer ...
-2
votes
0answers
7 views

Command Line Interface in Data Studio warehouse [duplicate]

@call wh executeProcessInstance is not working inside a batch file? How to make it use the set of wh commands as batch script ,in which path of SQW the batch file has to set. I am using windows in ...
0
votes
1answer
29 views

Repeat on user press, open up terminal, close terminal?

I am making a program and would like it to loop if an user presses a key. I also want to know if the bash file can automatically open a command terminal if it is not running from one to achieve the ...
0
votes
0answers
11 views

Search in multiple text files for lines that start With a string and show next a date (non determined) in ubuntu terminal

I'm looking for a date (not specified) with the format "DD-MM-YYYY" or "DD/MM/YYYY" that starts with at the beginning of the line with another string. inside some txt files, and assign it to a to ...
1
vote
2answers
5k views

How do I actually open a program from a batch file? All it does is open a command prompt with that file name [duplicate]

I'm currently trying to learn Batch file scripting so maybe I'm just not seeing what I'm doing wrong but I am just making a very simple batch file that opens up a text file. Here is the code I am ...
1
vote
1answer
274 views

OSX / Unix: move odd or even numbered files

I have a folder with a range of numbered files (camera images) and I'd like to move every other image into a different folder, so either all the odd numbered images, or all the even ones. How can I do ...
0
votes
1answer
51 views

How do I capture what I see in tail?

Tail seems to parse TTY commands. When commands use ^M to erase the line & redraw the line in stdout, for example an animated ASCII progress bar. When I tail a file where this is happening, I see ...
0
votes
1answer
53 views

defrag command line in Windows 7

I'm trying to consolidate my system partition volume by running defrag in a command prompt in command line recovery mode. This is the command I'm trying to have executed: defrag C: /X /H /U After I ...
0
votes
3answers
2k views

run 'net user' command as administrator

I was writing a simple batch file with the following command net user Abhi * where Abhi is my username and I am the administrator of my computer. On execution, it prompts for a password and then ...
0
votes
1answer
97 views

How to hide a directory and its contents on Centos

A quick Google search did not clear up my issue. I need to hide a directory on Centos 6. I want to do that because I'm running the command tree to print the tree directory structure, but I don't want ...
4
votes
3answers
96 views

Is there any way to colorize the output of a Linux command?

I'm kind of new to Linux, but I'm guessing that you could pass the output of a program to a particular script and have it display it in various colors, based on some regular expressions (constructed ...
1
vote
1answer
2k views

CutePDF command line or equivilant

Is it possible to run a command that will automatically print to file using CutePDF? I have tried this and still no luck: print C:\test.doc /D:CPW2 If not any other suggestion on how to automate a ...
10
votes
5answers
17k views

How can I count the number of folders in a drive using Linux?

I need to organise an external HDD such that there is no more than 500 folders on it. Ubuntu's "Properties" pane shows only the file count, not the folder count. Is there a simple command line that ...
2
votes
3answers
2k views

How to set to a variable, the result of a expression

I need to extract the date of a file, for then use this string as part of the name of a new file. I trying to solve this using the next commands: First I get the details of the file and redirect the ...