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)

35
votes
3answers
173k views

How to find the Ram type in command prompt?

How to find the ram type(DDR2/DDR3) of the system using command prompt? I have tried "SYSTEMINFO" in command prompt but it did not display the ram type.
0
votes
1answer
99 views

Concatenate multiple files with Windows command line

I use below two commands to concatenate multiple files from different directories: Method 1 type "C:\folder1\file1.txt" "C:\folder2\file2.txt" > output.txt Method 2 copy "C:\folder1\file1.txt"+"C:\...
3
votes
3answers
5k 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 ...
14
votes
2answers
14k views

How to calculate a relative path from two absolute paths in Linux shell?

We have two paths. First one is directory, second either a directory or a file. /a/b/c and /a/d/e.txt Relative path from first path to second will be: ../../d/e.txt How to calculate that in Linux ...
1
vote
1answer
3k views

Write file permissions for root user

I have a file called myfile that I would like to move using: sudo mv myfile deep-dark-directory/ I need to use sudo to move the file as deep-dark-directory needs root privileges to write and I can'...
3
votes
3answers
13k views

How can I add line breaks in an XML file from the Unix command line?

I have a large XML file. From the Unix command line, I'd like to add a newline after every >. I have tried using sed for this, with no luck: sed -i '' -e's/>/>\n/' file.xml This just ...
17
votes
4answers
7k views

What is the unix command to find out what executable file corresponds to a given command?

For example, if passed ls as input it should tell me that /bin/ls will run if run ls on the command-line.
24
votes
7answers
6k views

How do I see what my most used linux command are?

I would like to know which command I use the most on the command line. I would like to know so I can improve my use of the command line. If I know which command I use the most, I can then read more ...
12
votes
4answers
61k views

How do I send a file with FileZilla from the command line?

I have a batch file that builds an application, and then I want to upload it to an FTP server from the command line. Considering I do the upload manually with FileZilla, is there a command line for ...
1
vote
2answers
5k views

Annoying popup cmd.exe “FINDSTR cannot find the path specified”

I recently installed a Driver Booster software to detect and install out of date drivers. since installing, I have been getting a popup for a split second every hour or so. as it appears and ...
0
votes
0answers
29 views

Robocopy transferring more data than available on source

first question on StackExchange, so apologies if there are etiquette breaches! I am using Robocopy to mirror a complete disk drive to an external drive for backup/archive purposes. I used the ...
3
votes
1answer
31 views

Gateway / Router Detection with Bash: Functions and Variables

I'm drafting / still brainstorming / a bash shell script. The aim of which, is to; help the user to: Interface with various CLI tools. Perform various administrative tasks. It might, ...
14
votes
7answers
9k 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 ...
1
vote
1answer
20 views

How can I send a notification for a job, when it terminates?

I am working on a Linux system and I have been able to find solutions in the case where it will send a response for success or failure. But, in my case I need to know which one it is and I am often ...
8
votes
5answers
10k views

Windows equivalent of ssh - how to connect to a remote machine and access command line?

I'm having a difficult time coming up with a solution to extend a framework that was designed for *nix machines over to windows. The framework currently runs from one *nix server and ssh's out to ...
80
votes
4answers
15k 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 ...
2
votes
5answers
4k views

Linux Mint “PPA does not support trusty”

ta to the repostitories list in Linux Mint 17.3 but cannot seem to get it to add! I get the error: 'This PPA does not support trusty' Cannot add PPA: ''This PPA does not support trusty' I have ...
16
votes
4answers
30k views

What's the difference between the find and findstr commands in Windows?

In Windows, what are the differences between the find and findstr commands? Both seem to search for text in files: find C:\> find /? Searches for a text string in a file or files. FIND [/V] [/C]...
242
votes
4answers
60k views

How to turn off word-wrap in less

Short version: How can I make the less utility in Linux not wrap lines? Long version: Often I need to view huge CSV files using less with hundreds of columns. I frequently only care about the first ...
5
votes
2answers
9k views

In Windows 10, is there a command similar to wuapp.exe that will launch the Windows Update GUI?

In previous versions of windows running the command wuapp.exe would launch the Windows Update GUI. I want to be able to launch the Windows Update GUI from within a script/program thus would like to ...
0
votes
2answers
58 views

Create shortcut with arguments

I would like to create desktop shortcut to cmder with argument, for example SSH connect. I was trying: "C:\Program Files\cmder\Cmder.exe" ssh root@localhost But unfortunately I getting that ...
37
votes
2answers
43k views

Show only current directory name (not full path) on bash prompt

The way my bash prompt is currently configured, it shows the whole path to the current directory. This is annoying when I'm deep inside a directory tree, as the prompt becomes so long that every ...
1
vote
1answer
31 views

LibreOffice OS X: converting a .odt to .pdf from terminal?

Using LibreOffice, I can open an ODT document and export it as PDF manually. Is there also a command line do to this from the shell?
0
votes
1answer
3k views

How can I view all Java Processes running on a windows box using CMD prompt

On CMD prompt, I am trying to list all Java processes with the CMD line arguments. In short, I want to list all Java processes which has jmxremote.port set on cmd prompt. whats the best way of doing ...
48
votes
14answers
45k views

Is there a way to display a countdown or stopwatch timer in a terminal?

How can I display a real-time countdown timer on the Linux terminal? Is there an existing app or, even better, a one liner to do this?
1
vote
1answer
20 views

Building web projects with one Terminal command

I'm looking for a way to create web projects using one Terminal command. The project contains the basic structure of a normal website (index.html, style.css, script.js, images folder .. etc). Thanks,
20
votes
8answers
29k views

How do I get the number of frames in a video on the linux command line?

I have a video file and I want to get the number of video frames that are in it. I can use ffmpeg to get the length of the video and the FPS. However I can't see anything obvious for the total number ...
1
vote
0answers
7 views

Looking for command line values for an older (9.22 beta) 7zip

Better yet, is there a help file for the older 7zip utility? I want to test some PW recovery tools (build encrypted zip w/ known PW). This is probably trivial but starting from a 7zip.exe that has ...
0
votes
1answer
131 views

Bootable USB flash drive from iso using windows CMD (I can't find the tutorial…)

In the begining of last year or the end of 2014 I learnt how to make a bootable flash drive from an .iso from a youtube video. I tried to find the video but I can't and it's not in my history. The ...
1
vote
1answer
3k views

symlink and sudo executable

If I have the below sudoers entry usera ALL=(userb) NOPASSWD: /home/userc/bin/executable-file usera ALL=(userb) NOPASSWD: /home/userc/bin/link-to-another-executable-file When I log-on as usera and ...
0
votes
1answer
2k views

How do I transfer files using FileZilla via command line?

How can I transfer files to a particular server using the command line using FileZilla? Is it possible firstly?
1
vote
0answers
16 views

alias to programs in cmd? Where are they stored?

How do I add "shortcuts" (aliases) into cmd? For example the shortcut to HypersnapDX. On one computer I can simply enter HypSnap6.exe and Hypersnap openes. From any location. On the other computer ...
-2
votes
2answers
38 views

What's the use of a script that is run after login? [closed]

In several different network computers (school/company/...), I noticed that a script is run in the terminal after logging in with your personal account. Why would a network administrator run a script? ...
0
votes
2answers
14 views

Find highest numbered files in directory

Scenario: A backup system creates rar archives and splits them in 100 MB parts. I would like to find the highest numbered files within this directory. For example in- and output: Input: ...
1
vote
3answers
113 views

Good way to bookmark/navigate relative directory paths?

I work on a linux system with bash 4.x where I frequently find myself navigating different copies of very deep (and large) file directory structures. However, in reality I only need to access a ...
5
votes
10answers
1k views

How to minimize typing when frequently changing directories?

What are some good Linux commands to make switching between different directories on the command line easier? I often have to switch between different directories with long names, e.g. cd foo/...
1
vote
0answers
21 views

script with print screen and task scheduler problems

On a production system a script opens screens and sends them to hypersnapDX. Hypersnap then saves a picture in a folder which then is copied onto a server. This script is done by a cmd script. The ...
0
votes
2answers
471 views

Bash script: Use variable in sed to delete all but the last “x” lines of a file

I'm using the following bash script to delete all but the last 'x' lines in a log file: #!/bin/bash # Script to write to the log file every minute and delete all but the last # set time in hours ...
0
votes
1answer
68 views

SSH executes the command differently

After several experiments I got to a surprising behavior by SSH. I usually access to a specific application through an SSH connection. In fact, that app is on a virtual-box on a workstation in a LAB. ...
1
vote
3answers
3k 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 ...
0
votes
0answers
17 views

Linux: WD USB not seen via df command from cli - also not automount (only from graphical itf)

Situation: on linux (Mint): new external WD usb disk (after plug-in autodetected, accesible via /media/user, also visible via df cmd) formated to the ext4 (I know, my stupid step :( - but I had a ...
0
votes
3answers
58 views

Save Terminal Output command on OSX

It is simple question but couldn't find the answer, I found and tried tee output.txt and system_profiler > output.txt but no success, they save blank text file. How do I save my terminal output ...
2
votes
3answers
2k views

Adding Git repo and branch to Tmux status line

I have found a Tmux configuration file that shows how to add the Git branch to the Tmux status line, however It just shows [[ branch ]] no matter if I am in a Git repo or not. I am not sure if this ...
1
vote
1answer
22 views

Trouble making files in Windows folder lowercase

I need to make all files in a Windows 10 folder lowercase I ran the following command but some of the files still have uppercase letters for some reason for /f "Tokens=*" %f in ('dir /l/b/a-d') do (...
4
votes
1answer
117 views

Where is the echo command file found

If I type where echo it returns a message like : INFO: Could not find files for the given pattern(s). Where is the echo command found?
0
votes
1answer
46 views

Windows version of ''mkdir folder{1..100}/subfolder"

I am new to using the command line, especially in Windows. I would like to generate a (large) number of folders, say 100 of them, each with a subfolder of the same name. In Linux, I used mkdir ...
0
votes
0answers
44 views

create shortcut with runas admin privileges in parameter

I have a shortcut of a custom terminal/cmd program. This program always needs to be run with elevated/admin priviledges. Assume my program is situated at this location: C:\Users\User\custom_program....
0
votes
0answers
25 views

Single-line command to change process affinity by PID in Windows?

Is there a single-line command to change process affinity by PID with Windows? Preferably without a PowerShell dependency. The single-line aspect is a must and all the examples I've seen utilize ...
1
vote
1answer
98 views

VeraCrypt + CLI + /password + turned off log?

VeraCrypt can be managed by CLI and bash/batch scripts on Linux/Windows respectively. However, IDRIX emphasizes that command containing password [flag /p, /password (Windows) or --password (Linux)] ...
23
votes
3answers
76k views

How to detect the speed (fast or gigabit ethernet) of a network connection over Windows command line

To troubleshoot a network problem I would like to inquire the real network "speed" for a given network adapter, which can be seen when opening the "status" of a network connection under Windows: ...