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
54
votes
12 answers

What are useful .screenrc settings?

Basically like some of my own that I've posted below. I'm looking for added functionality to the programme 'screen'. At the very least have a look at the last line for a fantastic 'menu bar' at the bottom of a screen session. ## gyaresu's .screenrc…
Gareth
  • 8,573
  • 13
  • 44
  • 44
54
votes
10 answers

How do I check the build status of a Jenkins build from the command line?

How do I check the Jenkins build status without switching to the browser? If required, I can create a script using the JSON API, but I was wondering if there is already something like this built in.
Catskul
  • 1,929
  • 4
  • 20
  • 23
53
votes
4 answers

Linux command line character limit

I'm passing a variable to a script on the command line. What is the character limit of a command? eg: $ MyScript reallyreallyreally...reallyreallyreallylongoption Thanks.
robdog
  • 633
  • 1
  • 5
  • 5
53
votes
7 answers

Force SSH to use a specific shell

Is there any way to force SSH to use a particular shell on the remote end, regardless of what the user's default shell is? I've tried solutions akin to: ssh host.domain.com /bin/bash -c 'complicated, multi-line command' but unfortunately the…
plinehan
  • 675
  • 1
  • 5
  • 6
52
votes
6 answers

How to automatically close netcat connection after data is sent?

I am executing the following command from a script: echo '{"hostUp": true}' | sudo /usr/local/bin/netcat localhost 8001 However, the netcat client stays open indefinitely. How can I close the connection once this data has been sent?
Justin Meltzer
  • 711
  • 1
  • 9
  • 19
52
votes
4 answers

Linux/Windows/Unix/... file names: Which characters are allowed? Which are unescaped?

Which characters are allowed and which of them must be escaped on the command line in different operating systems?
52
votes
6 answers

Bash Loop - How to stop the loop when I press Control-C inside a command?

I am rsyncing a few directories. I have a bash terminal open and am executing something like this: for DIR in * ; do rsync -a $DIR example.com:somewhere/ ; done However if I want to stop the whole things, I press Control-C. That stops the rsync,…
Amandasaurus
  • 31,471
  • 65
  • 192
  • 253
47
votes
7 answers

Recursive text search with grep and file patterns

Given this example folder structure: /folder1/file1.txt /folder1/file2.djd /folder2/file3.txt /folder2/file2.fha How do I do a recursive text search on all *.txt files with grep from "/"? ("grep -r *.txt" fails when run from "/", since…
Anders Sandvig
  • 649
  • 2
  • 9
  • 10
46
votes
3 answers

How to check my PHP and MySQL version on Ubuntu VPS?

HI I am going to install MyBB but I am not sure whether I have installed the correct version of PHP and MySQL. PHP version 5.1.0 or above with XML Extension installed MySQL version 4.0 or above How to check that? Especiall the PHP XML…
DocWiki
  • 683
  • 2
  • 7
  • 8
44
votes
9 answers

How to hide a password passed as command line argument?

I'm running a software daemon that requires for certain actions to enter a passphrase to unlock some features which looks for example like that: $ darkcoind masternode start Now I got some security concerns on my headless debian…
q9f
  • 640
  • 3
  • 10
  • 21
44
votes
2 answers

Using dot (.) as delimiter to specify group in chown

I've always done: chown nimmylebby:admins file I see that this also works: chown nimmylebby.admins file Might seem like a silly question but I'm genuinely curious on how the latter works. It isn't documented in my chown's manpage (GNU coreutils…
Belmin Fernandez
  • 10,799
  • 27
  • 84
  • 148
43
votes
3 answers

What is the command to flash a NIC link light?

I remember using a command line tool to flash a NIC's link light to identify it. I can't remember for the life of me what it was.
rjmoggach
  • 1,013
  • 1
  • 8
  • 11
41
votes
6 answers

Avoid to keep command in history

I use bash and I would like to avoid some commands being kept in the history. Is it possible to do that for the next command only? Is it possible to do that for the entire session?
Luc M
  • 3,110
  • 4
  • 26
  • 27
41
votes
7 answers

What is the windows command line command to copy files?

What is the windows command prompt command to copy files? I need to move a file from location A to location B. Also if the folder for location B doesn't' exists I want to have it created. I need this to be a command line so I can automate it. The…
David Basarab
  • 1,157
  • 5
  • 16
  • 20
41
votes
5 answers

Smoothest workflow to handle SSH host verification errors?

This is a simple issue that we all face and probably resolve manually without giving much thought. As servers change, are re-provisioned, or IP addresses reallocated, we receive the SSH host verification message below. I'm interested in…
ewwhite
  • 197,159
  • 92
  • 443
  • 809