Questions tagged [command-line]

An interface for interacting with a computer using typed commands in a text-oriented environment, as opposed to a graphical user interface (GUI).

Filter by
Sorted by
Tagged with
1 vote
1 answer
526 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 ...
Louis Thibault's user avatar
0 votes
2 answers
385 views

What is the name of the command (function) that runs after a command has failed?

When run a command, if the command is not present, then some information regarding the failure of the command is displayed. I am trying to take the information about that failed command as input to ...
Ankanna's user avatar
  • 131
430 votes
19 answers
679k views

How to encode base64 via command line in macOS/OS X?

Is there a terminal command in macOS/OS X which will base64 encode a file or stdin?
Josh's user avatar
  • 9,747
389 votes
4 answers
663k views

Go back to previous directory in shell

Is there a way to go back to previous directory we were in using bash,tcsh without using pushd/popd ? I'd like to type something like "back" and got returned to the previous directory I was in. Edit: ...
Lydon Ch's user avatar
  • 5,979
381 votes
8 answers
888k views

How to recursively delete directory from command line in windows?

What is the windows equivalent of rm -r [directory-name]?
Eric Wilson's user avatar
  • 8,008
241 votes
5 answers
285k views

Recursively count all the files in a directory [duplicate]

Possible Duplicate: How can I count the number of folders in a drive using Linux? I have a really deep directory tree on my Linux box. I would like to count all of the files in that path, ...
omghai2u's user avatar
  • 2,930
236 votes
10 answers
473k views

How to copy symbolic links?

I have directory that contains some symbolic links: user@host:include$ find .. -type l -ls 4737414 0 lrwxrwxrwx 1 user group 13 Dec 9 13:47 ../k0607-lsi6/camac -> ../../include 4737415 ...
Basilevs's user avatar
  • 2,796
198 votes
13 answers
1.2m views

How do I edit text files in the Windows command prompt?

On Unix I'd just use vi, but I don't know what the command is on Windows. I am actually trying to edit files over SSH with Windows Server 2008.
Casebash's user avatar
  • 7,477
162 votes
3 answers
186k views

7Zip - Command Line : Exclude folder(s) by wildcard pattern?

Any idea how to exclude a wild-carded path(s) from a command-line 7zip command? I'm doing something like this: 7z.exe a -t7z archive.7z FolderToArchive\ -mx0 and would like to exclude any \bin\*.* ...
Yoopergeek's user avatar
  • 1,772
154 votes
4 answers
134k views

How to wget a file with correct name when redirected?

So after some time of searching on Google and Super User (and scanning man pages) I was unable to find an answer to something that (I think) should be simple: If you go here: http://www.vim.org/...
audio.zoom's user avatar
  • 1,763
109 votes
5 answers
97k views

How do I create a relative symbolic link in Linux?

I need a symlink that resolves relative to the directory it is placed in. What command is used to create such a thing?
Jeremiah Rose's user avatar
105 votes
5 answers
62k views

Keep cmd.exe command history between sessions?

Is there a way to keep the cmd command history between sessions?
firefusion's user avatar
  • 2,033
96 votes
5 answers
347k views

How do I determine if my Windows is 32-bit or 64-bit using a command? [duplicate]

Possible Duplicates: How to tell if a computer has a 64-bit CPU or OS Detect Windows Server version 32/64-bit in CLI OS version: 32-bit or 64-bit? How do I determine if my Windows system is ...
Negative's user avatar
  • 1,429
96 votes
16 answers
129k 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 ...
Jason's user avatar
  • 1,069
92 votes
12 answers
440k views

Commmand line command to copy entire directory (including directory folder) to another directory

using the command line, I'd like to copy one directory to another. For example there is directory C:/test and C:/test2. I'd like to copy C:/test into C:/test2 so that the result will be C:/test2/test ...
user avatar
91 votes
6 answers
1.6m views

How can I check a system's current NTP configuration?

I need to verify the current NTP configuration on some Windows systems. Ideally, I'd like to be able to do this via command line instead of navigating through configuration screens. (I'm working on ...
Iszi's user avatar
  • 13.8k
89 votes
5 answers
18k views

Why does "cd.." work in the Windows command line?

When typing cd.. without a space between cd and .. the Windows command prompt will happily switch to the parent folder. Is there an explanation for this behaviour? The command does not follow the ...
Jonas Köritz's user avatar
89 votes
4 answers
181k views

What does "2>&1" do in command line?

I know that the > sign is used for output redirection in the command line, but I'm having trouble finding something that explains the use of 2>&1 in the command line. For example: curl ...
Matt Huggins's user avatar
  • 1,299
88 votes
5 answers
1.1m views

How do I locate the MAC address of my computer?

I am unable to locate the MAC address in a new computer with Windows 7. I've tried ipconfig /all in the console to which I got no items match your search. I also tried getmac. A screen flashed very ...
user avatar
84 votes
3 answers
37k views

Reset colors on Windows command line (cmd)

I often run commands in cmd.exe that have pretty colors in their output, which is great. Unfortunately, sometimes they die in the middle, or I have to kill them, and then the console window itself ...
Ken's user avatar
  • 2,919
80 votes
7 answers
410k views

How to view serial COM ports but not through Device Manager

How would I go about viewing a list of COM ports in use without the use of Device Manager? I don't want to install any software either. Is there a possible way to do this through the command line?
Marmstrong's user avatar
77 votes
11 answers
235k views

Command-line (cmd) command to lock a windows machine

Is there a way to lock a Windows XP machine via the command line? The shutdown command doesn't have an option for it.
Herms's user avatar
  • 9,672
68 votes
8 answers
394k views

Completely delete a folder in Windows using command line

I need to delete one folder containing other folders and files inside. I tried del and rmdir commands but sometimes they fail with some error lines: [PATH]: The directory isn't empty. Is there any ...
Francesco Zanini's user avatar
67 votes
3 answers
90k views

Simple built-in way to encrypt and decrypt a file on a Mac via command-line?

Are there any built in command-line tools that I can encrypt and decrypt a text file (and provide it some sort of password).
codecompleting's user avatar
63 votes
5 answers
479k views

Close programs from the command line (Windows)

What is the proper way to close/exit programs from command line, similar to pressing the "X" close button in the corner of the window? Im trying to close chrome under 3 different versions of windows: ...
neoDev's user avatar
  • 1,174
63 votes
5 answers
51k views

How do I execute multiple commands when using find?

I'm trying to run multiple commands on things I have found, how can I achieve this? find . -exec cmd1; cmd2 does not seem to work; it instead runs cmd2 after cmd1 has been executed on every file.
Tamara Wijsman's user avatar
62 votes
5 answers
11k views

Why does `dir *.*` give me all files and folders?

When I run dir *.* it produces unexpected results. Even files and folders without any dot in their names are listed. For example C:\>dir *.* Volume in drive C is System Volume Serial Number is ...
phuclv's user avatar
  • 27.8k
59 votes
11 answers
46k views

Renaming many files in Mac OS X, batch processing

I used to rename file in Linux via a rename command: rename 's/old_pattern/new_pattern/g' *glob Is there something similar in Mac OS X (Snow Leopard)?
math's user avatar
  • 2,653
58 votes
1 answer
566k views

Create admin user from command line

How would I go about making an Administrator account (read not limited) from the command line in Windows? I have seen commands to the effect of: net user USERNAME PASSWORD /add However it is unclear ...
Zombo's user avatar
  • 1
55 votes
5 answers
59k views

Resume rsync over SSH after broken connection?

I have to transfer large amounts of data (>80 GB) over ssh using rsync. Everything is working fine, but the DSL connection where the backup data is sent from will drop once every 24h for up to 3 ...
user avatar
54 votes
3 answers
25k views

Use terminal scrollbar with tmux

I know how to scroll in tmux using the keyboard, but I noticed that it looks like there's a way to use the terminal scrollbar with GNU Screen. Can this be done with tmux?
Jeff's user avatar
  • 1,787
51 votes
10 answers
83k views

Navigate to previous directory in windows command prompt

Is there any command / tool to navigate previous directory in windows command prompt? In linux usually use cd - for previous directory navigation.
ukanth's user avatar
  • 10.7k
50 votes
1 answer
154k views

chown - Operation not permitted

I'm logged in as minime. I don't understand why it doesn't allow me to chown file that I own without su privileges. Obviously I can use sudo, but I'd like to understand why? because of www-data group?...
user avatar
42 votes
8 answers
31k views

How to pipe text from command line to the clipboard

I'd like to do something like dir *.* > clipboard ie. get to get the standard output of a command line program copied to the clipboard. Can this be done on a standard XP machine without ...
Ville Koskinen's user avatar
40 votes
5 answers
5k views

Does the Windows Command Prompt search somewhere other than those locations specified by the PATH variable when launching application programs?

I tried the following experiment. Before I start, I checked the PATH variable from cmd, which has the following value: Path=C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS ...
Anthony's user avatar
  • 571
39 votes
13 answers
65k views

Batch convert SVG images to desired size PNG or ICO [closed]

I have bunch of SVG icons that I'd like to use for my application to be developed in VB.Net 2010, and since it has no support to handle SVG icons, I need to convert those icons into either PNG or ICO, ...
Kushal's user avatar
  • 1,215
39 votes
6 answers
158k views

How to Execute ShortCut From Command line in Windows 7

We came with a scenario where we have to use Shortcut file (.lnk), which is on the desktop, to execute an application for a headless device (i.e, without manual intervention). Is there any way to ...
sandeep's user avatar
  • 493
37 votes
3 answers
45k views

Possible values of %PROCESSOR_ARCHITECTURE%

I'm writing a batch script for windows 7 and want to handle both 64 bit and and x86 processors. What are the possible values of the Windows %PROCESSOR_ARCHITECTURE% environment variable?
user avatar
36 votes
7 answers
78k views

Recursively rename files (change extension) in Linux

How do I rename all files in a directory, recursively, changing one file extension to another, for thousands of files in thousands of subfolders? I see a lot of commands that do almost what I want, ...
endolith's user avatar
  • 7,597
34 votes
1 answer
239k views

Batch file that runs cmd.exe, a command, and then stays open at prompt

I would like to make a batch file that: Opens cmd.exe Within that Command Prompt runs net use to display mapped share paths Leaves the window open so that I can run additional commands if I wish to ...
AaronLS's user avatar
  • 2,273
33 votes
3 answers
161k views

How to replace line in file with pattern with sed?

I'm reading a lot of documentation on sed, and am still stumped on my particular use case. I want to replace this line in a conf file with my own line: Replace this line: #maxmemory <bytes> ...
Henley Wing Chiu's user avatar
32 votes
5 answers
19k views

How to scroll up and look at data in GNU screen

I am using a mac (snow leopard). I am a ruby on rails developer and I watched a screencast on GNU screen and am trying it out. So far I like it. On a window when I start server I get to see the log ...
Nadal's user avatar
  • 959
32 votes
9 answers
8k views

Windows "cmd" Replacements [closed]

Resizing is one of the biggest problems I face with the default Windows command prompt. Are there are any free/open source alternatives available?
Srikanth's user avatar
  • 4,949
30 votes
13 answers
41k views

Undo the Linux trash command

Can we undo operations done in a terminal, for example, file deletion through rm? Solutions obtained: Aliasing Undelete utilities Backup utilities LibTrash Versioning (FUSE)
cdb's user avatar
  • 1,079
29 votes
3 answers
77k views

Chkdsk Questions

Recently in running chkdsk /r on my system drive (platter drive, Windows 7 Ultimate 64bit) I've gotten back results like: 4 EA records processed 76 reparse records processed Am I right in assuming ...
Lil' Smokey's user avatar
29 votes
8 answers
260k views

How do I FTP multiple files from the command line?

I would like to FTP the contents of a directory, but I can't seem to find the right way to use a wildcard. It seems like this would be a common thing to do; is my whole approach wrong? The command is ...
mmcglynn's user avatar
  • 669
28 votes
13 answers
68k views

Unix-type "locate" on Windows?

Using the Windows CLI (cmd), how does one locate a file that he knows part of the name of? For instance, every single Windows workstation installs javac in a different location, how would one find it ...
dotancohen's user avatar
  • 11.5k
27 votes
4 answers
11k views

How can I widen the Windows 7 Command Prompt window?

How can I widen the Windows 7 command prompt window? It's fixed at 80 columns in width and dragging the window edges won't let me make it any bigger than that.
user81430's user avatar
  • 539
27 votes
4 answers
7k views

A command before every bash command

Does anyone know a mean of putting a 'time' command before every command in a bash session?
jthoenes's user avatar
  • 373
27 votes
10 answers
49k views

Converting a PDF to black & white with ghostscript

Similarly to this question: Convert a PDF to greyscale on the command line in FLOSS? I have a PDF-document and want to convert it to pure black and white. So I want to discard halftones. To ...
niklasfi's user avatar
  • 601

1
3 4
5
6 7
31