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

run interactive program from Window CMD script

I have a CMD script to run on Windows. It does DEL, but the shell would ask "Are you sure?" How do I make the script answer 'YES', or better yet, just does a silent DEL ? Thanks
0
votes
1answer
361 views

Parse contig.exe output to *.csv using command-line or PowerShell

I am trying to parse the output file from contig.exe into a a comma-separated value file. I've developed a method to do this is Notepad++, but given the number of files I have to parse (hundreds of ...
4
votes
3answers
129 views

change the first word of the previous command

For example I enter cat /very/long/path/textfile and right after that I decide to give the next command rm /very/long/path/textfile So, my question is: What is the easiest/fastest way to replace ...
0
votes
0answers
83 views

Let SWF load for x amount of seconds before SWFTools converts it to an image?

I currently have a code that looks like this: .\swfrender "C:\users\****\My Documents\****\****.swf" -X 300 -o "C:\users\****\My Documents\****\****.png" However, SWFTools coverts the SWF to an ...
0
votes
2answers
5k views

Windows command to perform a similar function to spool command in SQL or Script command in UNIX?

In DOS is there a command to perform a similar spool function in SQL or Script command in UNIX to create a log? I want to print all command line output to a file but I don't want to use the echo ...
1
vote
1answer
124 views

How to run a command line script every Friday at 3:00 AM automatically?

I currently use SWFTools via command line on my computer. I have two commands that I want to run every Friday at 3:00 AM automatically. However, I want to run the two scripts in a specific order. This ...
6
votes
1answer
1k views

How to run internal cmd command from the msys shell?

The Windows CMD utility has a number of internal commands, such as mklink. How can they be used from the msys shell ? From CMD's documentation, the /c switch can be used to execute a command and ...
0
votes
2answers
560 views

How to run Privoxy from command line on Windows?

Privoxy won't start from command line (BATch file). Config file is specified. D:\app\net\Privoxy_latest\privoxy.exe D:\app\net\Privoxy_latest\config.txt Ending with: Fatal error: can't load ...
0
votes
1answer
694 views

Cat file to terminal at particular speed of lines per second

I'm lazy and I could write a script to do this, but I'm even too lazy to think of how to do it. I often do things like : cris$ python runexperiment.py > output.txt cris$ cat output.txt ...
1
vote
2answers
238 views

CD command not returning correct results under FOR loop

The CD command returns the current directory, and the %CD% variable returns the same result in an environment variable: c:\Temp\test\test1>cd c:\Temp\test\test1 c:\Temp\test\test1>@echo %cd% ...
0
votes
1answer
2k views

Can't edit '/etc/network/interfaces' file through bash script in Ubuntu [duplicate]

Possible Duplicate: sudo permission denied I got need to edit /etc/network/interfaces through bash script, I am doing something like below... sudo echo something > ...
0
votes
1answer
102 views

Is it possible to catch the arguments of a program?

I wwant to catch the command-line arguments of a program I use, so when I start test.exe with arguments -debug and -console I can see this arguments even if I don´t have the source code of the ...
3
votes
1answer
325 views

/usr/sbin/installer requires root, not Admin, to install a package

Prior to Mountain Lion, I was able to install packages with /usr/sbin/installer as an Admin user. However, with Mountain Lion, when I try running installer -pkg blah.pkg -target / I get the error ...
3
votes
3answers
89 views

Windows 7: Extending the command line prompt

Is it possible to extend the windows cmd prompt, by prepending a string to the current prompt? If I would use bash, I would write something like PS1="XXX $PS1" Is there a similar possibility for ...
3
votes
1answer
1k views

Add keyboard layout in command line in Ubuntu and shortcut to switch

I want to create a bash script that adds the "French (Canada)" keyboard layout. In addition, I would like to set Alt+Shift as the keys used to change layout.
2
votes
4answers
11k views

AWK Equivalent Functionality on Windows

I need to troubleshoot some issues on a client PC that I am unable to install additional software on and need some basic functionality of awk on windows xp & 7. Basically, I need to strip the ...
5
votes
1answer
2k views

Convert grayscale image into alpha channel image in unix shell

I have a gray-scale image. I want to convert it into an transparent PNG, such that the black pixels (in the original image) become fully opaque, the white pixels become fully transparent, a 50% grey ...
2
votes
2answers
508 views

Shutdown Windows 8 [duplicate]

Possible Duplicate: How do I shutdown Windows 8? I haven't been able to find anything in the GUI of Windows 8 to shutdown the computer. So I have to open a Command Prompt and type ...
1
vote
1answer
305 views

How can I start a process over SSH such that it will continue to run after I disconnect?

XBMC occasionally crashes on my media server. It's a pain to bring down the media server because I have to manually restart a number of services each time. I'd like to be ablle to start XBMC from an ...
0
votes
1answer
607 views

How to rename and extract all file?

Looking for a .bat to rename and extract all. The folder is d:\EJ\%dd%-%mm%-%yyyy%\ (multiple files) K02699_ej.zip K02702_ej.zip K02703_ej.zip K02704_ej.zip K02705_ej.zip Rename to K02699.zip ...
1
vote
2answers
5k views

Search for a file with wildcards in the path using Windows command line

How can I search for files in the Windows command line, using wildcards like this? C:\Users\*\AppData\Local\*.txt
2
votes
1answer
761 views

Open multi files with batch file

I have a trouble when I open multi images with Irfanview . It only opens one file, and after I close the window, it opens next one. I want to open three windows instantly. I hope someone help me out. ...
2
votes
2answers
8k views

What command to use to unpack a .tar.gz file in Windows?

I use to receive tar.gz files fromm colleagues but unpacking them with 7zip is not convenient as it unpacks a tar file from gz first while I usually seek to get the tar file contents (so I have to ...
1
vote
1answer
2k views

CMD Using DIR to order directories by name

I'm using the following command to list files including those in sub-directories ordered by name. dir /b/s/on The files are correctly ordered within their given directories but the directories are ...
0
votes
1answer
119 views

List files in CMD with DIR

I'm trying to use DIR to list all files in the current directory and sub directories ordered alphabetically. I only care about the filepath and name. I don't want the size, counts, etc. Here's what I ...
20
votes
5answers
80k views

How can I find out when Windows was last restarted?

How can I know when my computer running Windows 7 was last restarted? I prefer a solution that doesn't involve searching the event log, but something like wmic or maybe cmd commands.
0
votes
2answers
842 views

Remove antivirus from startup via command prompt (Windows)

How from the windows command prompt can I tell my machine (windows 7) to not load my antivirus software (Symantec if that matters) automatically the next time I boot it up? Assume I can't open any ...
2
votes
1answer
1k views

What is command to look list of redirect rules, iptables

im using command like this : iptables -t nat -A PREROUTING -p tcp -d 192.168.1.118 --dport 4080 -j DNAT --to-destination 192.168.1.118:4088 My question what is command to look all rules in the ...
4
votes
1answer
1k views

Clear Chrome's cache via CLI

Is there a way to clear Google Chrome's cache via a CLI command on OSX? Ideally this would be made via some “official” way, and preferably without having to open Chrome (i.e. by launching it with some ...
3
votes
1answer
1k views

Using ffmpeg with decimal wildcard

I have a folder with PNG images of the following naming scheme: IMG_0423.png IMG_0424.png ... IMG_0509.png I would like to make an MP4 movie from these images, but I get an error message that ...
29
votes
9answers
38k views

How can I get my public IP address from the command line, if I am behind a router?

Is there a way for me to get my public (WAN) IP address on the command line? I am behind a router (LAN network), with a dynamic IP address assigned by my ISP. I have seen solutions using an external ...
-2
votes
1answer
2k views

How to download a Youtube video from command line? [duplicate]

Possible Duplicate: Download YouTube via command line How to download a Youtube video from command line? Mac OS X and/or Ubuntu Linux. Optionally, i'd like to save it in .avi or .mkv ...
10
votes
2answers
3k views

using “runas” with “Administrator” account versus other admin accounts

On my computer, I have two admin accounts. The default admin account named "Administrator", and a new admin account named "testadmin." If I run the following commands: runas /user:testadmin cmd.exe ...
3
votes
2answers
3k views

Get Windows ping and ipconfig tools

For some reason, my Windows 7 computer does not recognise the cmd.exe tools ping and ipconfig. I have tried to download them from the web, but I can only find tools that do similar stuff; not the ...
1
vote
1answer
278 views

Issues with mv on windows xp bash shell

As I'm pretty used to the Linux terminal, I set up a bash shell on my Windows XP command prompt by following the instructions in this article: ...
0
votes
2answers
469 views

rename multiple file add number to name using batch

I have files in folder named unix_aaa.txt unix_bbb.txt unix_ccc.txt and so on. How do I change all the files that start with unix to names like 001_unix_aaa.txt 002_unix_bbb.txt 003_unix_ccc.txt ...
2
votes
2answers
2k views

Mass file renaming in Bash but keeping a section of the file name

I have a large number of .jpg file that have extraneous data ahead of a file id that i need to have removed to better set up my file structure for a later project. How can I do a batch rename in ...
3
votes
2answers
456 views

Linux: find first result from specified search path

If I have a colon-separated path list, much like $PATH, but not neccessarily $PATH. I want to search that list for a specific file name. However, I only want the first matching path. I have ...
3
votes
1answer
1k views

Is there a command line client for 8tracks.com playback? [closed]

I hope I'm not spamming with this kind of question here, but: is there a way to play 8tracks.com playlists from Linux command line using, for example, mplayer or mpg123? There is the 8tracks.com API, ...
0
votes
1answer
292 views

I am trying to zip files individually, but the file type is unknown

I am trying to zip some files with an unknown file type individually. I am using the following code in a batch script to do that: @ECHO OFF FOR %%A IN (bestbuy*nat*component.cpi*) DO "C:\Program ...
3
votes
5answers
492 views

How can I view a .eml file from command line in Windows Vista?

Ok, so my parent's computer crashed (horribly - corruptedRegistry) and I'm trying to access one of their e-mail files that is saved locally on the hard drive. I can't launch Windows itself so right ...
3
votes
3answers
8k views

OSX: using CLI version of VLC

How can I use the CLI version of the VLC on OSX? After installing VLC on OSX, it works fine through the normal GUI process, spotlight, etc. Also, I know it's possible to do open bla.avi -a vlc ...
4
votes
2answers
4k views

How to add commands of windows to local shell of XShell 4

XShell is a very powerful tools to ssh remote computers such as Unix/Linux. And it has built some internal commands for you to run within your Windows. Xshell:\> help Internal Commands: new: ...
7
votes
4answers
45k views

How do I add a password to a batch file to automatically authenticate?

I'm trying to run xcopy commands in a batch file as an administrator. Is this the correct command and how can I pass the password into it? runas /noprofile /user:Domain Name\user account
5
votes
1answer
825 views

Can't execute any commands in bash except as sudo

I don't know what I did but suddenly i can't use any commands except and only preceded with sudo. No matter the command I get bash: /home/otis/bin/ls: cannot execute binary file. Even cp I get bash: ...
3
votes
3answers
9k views

bat file to disable ethernet adaptor and then reenable it after windows log in

When I log into Windows 7 I need to wait 10 seconds and then disable the Local Area Connection (ethernet adaptor) and then reenable it. I have looked through the suggested answer: Enable/disable ...
0
votes
1answer
123 views

Send bash profile for ssh login

At my work, I ssh into a lot of Linux boxes (using MTPuTTY on win 7, though I can use anything if need be, up to and including dual booting Linux). We are not set up so that people's home directories ...
2
votes
3answers
3k views

Delete set of files using find command

Background Delete a set of files, scattered across different directories. Problem The following code does not work (the unescaped | causes issues); for %i in (dir /s/b | find "lock") do echo del ...
8
votes
2answers
905 views

Why does dd only copy 128 bytes from /dev/random when I request more?

I'm trying to understand the output of the dd command. I tried dd if=/dev/zero of=/dev/null bs=512 count=1 and got (as expected): 1+0 records in 1+0 records out 512 bytes (512 B) copied, 2e-05 ...
1
vote
1answer
550 views

Run batch file with custom drive mappings

I want to create a "mini virtual environment" to run a program. The only difference between my normal environment and the virtual one would be the drive mappings. I have an X: drive mapped to ...