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)

1
vote
1answer
63 views

Can't find the good Cygwin shell executable

I am working on Windows 7 and I need Cygwin for my project. I am trying to launch the Cygwin terminal from a Java programm and then write command lines but my problem is that I can't find the right ...
12
votes
6answers
14k views

What does “sudo -s” actually do?

I am using ubuntu 10.04. I notice that after I run "sudo -s" in terminal, the prompt changed from "XXX@XXX" to "root@XXX", seems it changed to root privilege. But when I check the ...
1
vote
2answers
34 views

How do I interactively type \r\n-terminated query in netcat?

$ nc example.com 80 GET / HTTP/1.1 Host: example.com HTTP/1.1 200 OK ... It works, line separator is just 0A here instead of required 0D0A. How do I type a 0D0A-separated query in netcat? It is ...
1
vote
1answer
51 views

How do I select a random file in a folder?

I am trying to select a random file of a specific type like *.mp4 from a folder (and optionally subfolders) using the Windows command line batch script (no PowerShell) The file full path should be ...
0
votes
1answer
18 views

cmd-f freezes the program and has unexpected inputs in mac os X

I have a mac os X. After certain point, cmd-f is taking a very long time in every programs. The program freezes so that I have to eventually force quit the program I tried cmd-f. Another cue is that I ...
1
vote
1answer
11k views

How to mount a Windows share in OpenDreambox via Telnet?

I have created a new folder on root of C disk called recordings and I have shared it with everyone. I now want to mount this folder on my Dreambox so that I can record to it. But since this is an ...
-2
votes
1answer
18 views

Any other useful 3rd party command line utilities such has SendEmail.exe? [closed]

I'm looking for other useful tools like SendEmail.exe to use in my batch files. Such as ones that I can call form a batch file that can do something you normally couldn't do from batch. For example, ...
1
vote
3answers
790 views

Is there a console command to switch the left and right mouse buttons?

My friend has a Mac mouse on a windows. When he clicks the mouse, its a right-click because the settings are reversed. Is there a console command to switch it back? Seeing as he can't fix it with ...
1
vote
2answers
326 views

Winrar command line zip folder

I am trying to use WinRAR command line to zip folder: "c:\Program Files\WinRAR\WinRAR.exe" a -afzip "e:\output.zip" "e:\foldertozip\" If the foldertozip contains file, the command line works. But ...
0
votes
1answer
159 views

PowerShell script to decrypt file

Can some one help me with this command to decrypt files using powershell? echo YOURpassPHRASE | gpg --keyring "C:\directory\filepath" --secret-keyring "C:\directory\filepath" --batch --yes ...
-1
votes
1answer
12 views

ENV Variable not working - Windows 8

Trying to add an environment variable called phantomjs to my PATH: ECHO %PATH%: ...;C:\foo\phantomjs.exe but when I run where phantomjs, I get INFO: Could not find files for the given ...
12
votes
6answers
28k 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 ...
1
vote
3answers
3k views

Copying a directory by retaining its permission

I've located this KB article which explains the topic title. But what my problem is that when I use "xcopy" command; it only copies the contents inside a directory to the new location but not the ...
1
vote
3answers
4k views

Color in Cygwin terminal

I've installed cygwin because I'm a bit fed up with the Windows terminal not being great. The only problem I'm having is the lack of colours. You can see the problem in the following 2 screenshots ...
1
vote
2answers
53 views

Concatenate multiple tar files in one command

I receive anywhere from 4 to 100 very large tar (~20GB) archive files everyday. I have been concatenating them in the past by looping through each of the archives I see on the file system and doing ...
0
votes
1answer
18 views

Hashutils to recurse the whole drive

Following this post another super user question, I downloaded hashutils. Works great with with the -r flag to recurse a folder. However, I am unable to recurse a whole drive. Trying this command, the ...
0
votes
1answer
2k views

Log into hidden administrator account with standard user

I created an administrator user account (jeff) and then downgraded an existing account (jen) to a standard user. All was good I accomplished my goal except I didn't want the admin account to show on ...
0
votes
1answer
74 views

DNS problems from command prompt

I can't get a network connection when using the command line for some reason, even though it used to work. I think it's a DNS problem because I can ping 8.8.8.8 but not google-public-dns-a.google.com: ...
0
votes
2answers
59 views

Confirmation prompt for chmod, chown

I'm just trying to add a confirmation prompt to a few linux commands like chmod and chown. I've tried to google this but I can't find much information on the topic. While searching I found out ...
1
vote
1answer
29 views

Can I display specific part of Output from Command Prompt in Windows?

If I run netsh wlan show hostednetwork it will display, Hosted network settings, Hosted network status these two parts. But, if I want to display just the "Hosted network status" ...
-2
votes
1answer
48 views

Command line switches for Netop Remote Control version 9.0 (NGstw32.exe)

Would anyone by any chance have the command line switches for Netop Remote Control version 9.0 (NGstw32.exe)? I've contacted Netop support but they no longer support this version, and I can't update ...
0
votes
3answers
54 views

How to access folder path from first input parameter and how to call IF Loop in batch file?

@Echo OFF SET FilePath=%1 SET HeaderFilePath=%2 SET RetrunCode="0" Call :sub %FilePath% exit /b :sub SET FileName=%~n1 SET FilePath=%1 SET "FileType=.zip" CALL SET ...
10
votes
2answers
3k views

Bash: Replace all occurrences of a word in the last command

Almost by mistake, I figured out you could do something like: $ cp foo.data bar1.data $ ^bar1^bar2 And that runs the same command with bar2.data instead of bar1.data. Now, how about if I have ...
5
votes
2answers
7k views

VirtualBox command line error

I can run VirtualBox just fine, but when I run anything from the command line I get: VBoxManage.exe: error: Failed to create the VirtualBox object! VBoxManage.exe: error: Code ...
1
vote
0answers
50 views

Why is pasting in a windows cmd window so slow?

I can paste a novel into shell session on a remote computer near instantly, but when working local on my Windows 8 PC, pasting into the cmd window appears to paint each character individually and for ...
10
votes
4answers
821 views

Pass text to program expecting a file

Related to a question I asked on Stack Overflow: Passing multiple lines of code to wsadmin.sh?. I have, as a string, a few lines of input that I need to feed into a command. The command, however, ...
0
votes
1answer
48 views

Changing wireless network password

I have a cisco 1900 series router connected to a modem. I want to change the current wireless network password with which a user can access the network and connect to the internet. Is this supposed to ...
0
votes
2answers
60 views

Using 'send to…' upload file to FTP and copy it's URL to clipboard

I hate odd, almost useless apps on my PC. I don't want them to hang in there running and waiting for me use it once in a week. So I thought the instant fileshare could be done using almost only ...
0
votes
3answers
2k views

Command/script to copy files with certain ext, which may have the same name, from folder structure to singe directory and rename

From a source directory structure (multiple folders), I need to copy all csv files to a single target directory. I found a command to do this, though files of the same name exist within different ...
1
vote
1answer
17 views

Change user storage folder from /home to somewhere else

I want to let a user take huge space on another drive. Is there a command that I can move the user from /home folder on a mounted drive in /mnt folder? If I do move folder /home/foo to ...
0
votes
1answer
22 views

How can I quickly tile these command prompts in windows 2012?

I have many command prompt started in one go by a batch file. (16 altogether) I want to know if there is any easy way to tile these DOS prompt easily via the Windows GUI alone. Preferably into 8 rows ...
0
votes
2answers
1k views

Setting CMD CD to the directory that the batch was run in

I'm trying to create a batch script that will open a program in a different environment (so I can make a portable version of it). I use this set APPDATA=%CD%\data to tell it to do that. The problem ...
1
vote
0answers
36 views

Can't run PowerShell as admin inside of Webstorm

I am trying to figure out how to run PowerShell as an admin embedded in Webstorm. I can run PowerShell as non-admin in Webstorm, but when I try to run PowerShell as admin inside Webstorm I get the ...
5
votes
3answers
996 views

Windows 7 “open command window here” not getting updated path variable

I have just edited my PATH variable, adding one directory at the end. When I run CMD.EXE from the start menu and typed PATH, I could see my new directory. But when I opened a command window by ...
0
votes
1answer
28 views

Parse and Switch Elements of Folder Names using Powershell

I have been trying to write a powershell script (my first) to parse out only the folders within a directory select only those folders matching a specific naming convention ('SEASON YEAR') switch the ...
1
vote
0answers
43 views

Which SATA port is my disk connected to?

We have a computer with multiple boot drives, all of which contain the same software. The selection of the boot disk is via multi-position switch on the front panel. If disk 1 is selected, the disk ...
0
votes
0answers
19 views

Mogrify combine every two images

I'm not sure how to accomplish what i'm trying to do. I have several folders with around 100 pictures, i have created another modified version of those 100 pictures that are bigger than the ...
1
vote
1answer
382 views

Display image with fit to window and single instance mode

I’ve got a stream of images (jpg) and I want to display each one as soon as it arrives. So, basically, here is what I want: There is currently some image on the screen; a new image arrives, my ...
1
vote
1answer
19 views

Windows Batch. Append to PATH Environment Variable, when It Contains Spaces

I want to add some binaries to path for my console session and I'm doing it like so if not defined WIXTOOLKIT_IN_PATH ( set WIXTOOLKIT_IN_PATH=1 set MY_PATH=%~dp0..\tools\wix SET ...
44
votes
6answers
13k views

Is there a shortcut to mkdir foo and immediately cd into it?

This is something I do frequently $ mkdir foo $ cd foo This works as a single command, but it's more keystrokes and saves no time. $ mkdir foo && cd foo Is there a shortcut for this? ...
0
votes
2answers
20 views

Ctrl+c is not working with gedit

When I use gedit command to try edit the a file and then pressing ctrl+c is not terminating the gedit and giving the following log gedit test.sh ...
1
vote
0answers
135 views

Executing Minecraft Server Commands via SSH and Screen

I'm extremely new to linux, so please help me out if you can! I have read many of the posts about managing/monitoring servers using SSH and Screen, but have not found anything regarding my particular ...
35
votes
8answers
98k views

How can I execute a Windows command line in background?

How can I execute a windows command line in the background, without it interacting with the active user?
1
vote
1answer
32 views

How do I use a for loop and output to a different directory

usage: pdftotext [options] <PDF-file> [<text-file>] I'm using pdftotext (xpft, usage above) to covert all pdfs in a directory (and subdirectories) to textfiles. It doesn't matter if ...
14
votes
8answers
16k views

How to write a script that accepts input from a file or from stdin?

How can one write a script that accept input from either a filename argument or from stdin? for instance, you could use less this way. one can execute less filename and equivalently cat filename | ...
0
votes
2answers
28 views

Prefixing output text in batch

I am trying to create a remote, WMI query script that will query a bunch of machines and tell me the MemoryChip configuration information. This way, we can find out what machines physically have 1 ...
3
votes
2answers
6k views

Create ext3 partition on external drive from Windows 7

Are there free CLI tools for Windows (7) which allow me to partition and format an ext3 file system on a external USB drive from Windows natively? I am not looking for a solution with a bootable live ...
2
votes
2answers
61 views

Get *hostname* of a RDP client computer

This question: Get hostname of a RDP client computer, asked how an RDP server can identify a client (i.e., the host that is being used to login remotely), and got this answer: netstat -na | find ...
0
votes
1answer
37 views

How to run R from the windows command prompt?

I want to run R from the command prompt in Windows 8.1. I am logged in as an administrator, I started cmd.exe with the "Run as administrator" option, the path to the folder containing R.exe has been ...
0
votes
3answers
126 views

Copying folders in Windows

I have the following folders on a Windows machine C:\FolderToCopy C:\Dest Both folders are empty. I want to execute a copy operation from a command prompt so that I have this in the end: ...