Questions tagged [command-line-interface]

A command-line interface (CLI) is a mechanism for interacting with a computer operating system or software by typing commands to perform specific tasks.

A command-line interface (CLI) is a mechanism for interacting with a computer operating system or software by typing commands to perform specific tasks.

1564 questions
109
votes
10 answers

How to display certain lines from a text file in Linux?

I guess everyone knows the useful Linux cmd line utilities head and tail. head allows you to print the first X lines of a file, tail does the same but prints the end of the file. What is a good command to print the middle of a file? something like…
Boaz
  • 2,229
  • 5
  • 20
  • 15
104
votes
2 answers

How can I connect to a Windows server using a Command Line Interface? (CLI)

Especially with the option to install Server Core in Server 2008 and above, connecting to Windows servers over a CLI is increasingly useful ability, if not one that's very widespread amongst Windows administrators. Practically every Windows GUI…
104
votes
11 answers

How to zip/unzip files in Powershell?

Is there a one-liner that will zip/unzip files (*.zip) in PowerShell?
BlueGene
  • 2,241
  • 9
  • 30
  • 33
102
votes
11 answers

How can I get diff to show only added and deleted lines? If diff can't do it, what tool can?

How can I get diff to show only added and deleted lines? If diff can't do it, what tool can?
C. Ross
  • 3,075
  • 9
  • 35
  • 36
100
votes
3 answers

How to get the url of the current svn repo?

I have 2 svn checkouts that someone setup for me. Now I need to check these same files on another computer, but since I didn't check them out initially I don't know the urls to use when running the svn checkout command: svn co WHAT_GOES_HERE? Since…
Manny
  • 1,003
  • 2
  • 7
  • 4
91
votes
7 answers

How to sort ps output by process start time?

Is there a way to sort ps output by process start time, so newest are either at the top or bottom ? On Linux ? On SysV5 ? On Mac ?
Dean Smith
  • 1,270
  • 2
  • 11
  • 13
82
votes
7 answers

What is the Windows equivalent of Unix "whoami" command?

Is there a Windows equivalent of Unix "whoami" command? If so, what is it?
Kip
  • 3,480
  • 3
  • 23
  • 14
69
votes
6 answers

How can I query my system via command line to see if a KB patch is installed?

I'm looking to find out if a KB is installed via command line.
MathewC
  • 6,957
  • 9
  • 39
  • 53
68
votes
2 answers

GNU less: How can I search while ignoring case sensitivity without using less -I option?

From GNU less manpage -i or --ignore-case Causes searches to ignore case; that is, uppercase and lowercase are considered identical. This option is ignored if any uppercase letters appear in the search pattern; in other words, if a pattern contains…
Tom Feiner
  • 17,578
  • 8
  • 30
  • 24
65
votes
18 answers

How to ping in linux until host is known?

How can I ping a certain address and when found, stop pinging. I want to use it in a bash script, so when the host is starting up, the script keeps on pinging and from the moment the host is available, the script continues...
Sander Versluys
  • 911
  • 1
  • 10
  • 12
65
votes
3 answers

php cli memory limit

I am getting a memory error in a php cron job: Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 71 bytes) in /opt/matrix/core/lib/DAL/DAL.inc on line 830 The applicable parts of the crontab are: $ sudo crontab -u…
Ryan H
  • 1,468
  • 3
  • 15
  • 19
60
votes
1 answer

What is the difference between a 'Login' and an 'Interactive' bash shell

What is the difference between a ‘Login’ and an ‘Interactive’ bash shell? I have quoted Wikipedia below but can anybody give a better answer? EDIT: This is a community wiki so maybe rather than voting to close you could provide examples of which…
Gareth
  • 8,573
  • 13
  • 44
  • 44
58
votes
55 answers

What are useful Command-line Commands on Mac OS X?

Per the Windows and Linux threads, what commands do you find most useful in Mac OS X Server (or Client)?
username
  • 4,755
  • 19
  • 55
  • 78
57
votes
6 answers

How do I print contents of at jobs?

I have a Debian box with some jobs scheduled using at. I know I can list the jobs with their times using atq, but is there any way to print out their contents, apart from peeking into /var/spool/cron/atjobs?
che
  • 719
  • 1
  • 5
  • 13
54
votes
4 answers

Is there a built-in command-line tool under Windows like wget/curl?

I come from a Linux/Unix background and I have been wondering if Windows has a binary that can download files from the console. I would like to automate a certain process and one of my requirements it to not install much software, but use the…
carlspring
  • 713
  • 1
  • 7
  • 12