Most Popular
1500 questions
106
votes
6 answers
A list of available D-Bus services
Is there such a thing as list of available D-Bus services?
I've stumbled upon a few, like those provided by NetworkManager, Rhythmbox, Skype, HAL.
I wonder if I can find a rather complete list of provided services/interfaces.

madfriend
- 1,163
106
votes
11 answers
How to do nothing forever in an elegant way?
I have a program which produces useful information on stdout but also reads from stdin. I want to redirect its standard output to a file without providing anything on standard input. So far, so good: I can do:
program > output
and don't do anything…

a3nm
- 9,207
106
votes
7 answers
ssh unable to negotiate - no matching key exchange method found
I am trying to log in to my DSL router, because I'm having trouble with command-line mail. I'm hoping to be able to reconfigure the router.
When I give the ssh command, this is what happens:
$ ssh enduser@10.255.252.1
Unable to negotiate with…

j0h
- 3,617
106
votes
4 answers
Is there any way to exit "less" without clearing the screen?
Relatively often, I find myself wanting to quit less but leave what I was viewing on the screen, to refer back to. Is there any way to do this? Workarounds?
(My current workaround is to quit, then use more. So any workaround that's better than that…

Steve Bennett
- 2,213
106
votes
4 answers
How to add/remove an element to/from the array in bash?
I have an array containing some elements, but I want to push new items to the beginning of the array; How do I do that?

SecureTech
- 1,389
106
votes
5 answers
Install PostgreSQL client (psql) only on CentOS
Simple question, but no resources found about this. Is there any way to install only a PostgreSQL client, the terminal-based one, psql, on a CentOS7 system, without installing the complete PostgreSQL server? There is no dedicated postgresql-client…

Aleksandar Stojadinovic
- 1,195
106
votes
3 answers
How to signal the end of stdin input
In Bash, I learned that the ending signal can be changed by here document. But by default how can I signal the end of stdin input?
I happened to find that with cat and chardet, their stdin inputs can be signaled as finished by Ctrl+D. But I seems…

Tim
- 101,790
106
votes
12 answers
How to find out which interface am I using for connecting to the internet?
I have eth0 and wlan0 according to ifconfig and I can ping google.com.
How can I find out (with a normal user, not root) what interface is active, as in, what interface did the ping (or whatever, ping is not mandatory) use?
I am using Ubuntu 11.04…

LanceBaynes
- 40,135
- 97
- 255
- 351
106
votes
5 answers
Differences between sed on Mac OSX and other "standard" sed?
I am having some issues in using an answer provided on this site for this question about a sed command to replace a blank line with two other lines of content, and it was brought up if the sed command on Mac OS (10.6.7 for me) is different. I don't…

Peter Grill
- 1,593
106
votes
3 answers
What are pid and lock files for?
I often see that programs specify pid and lock files. And I'm not quite sure what they do.
For example, when compiling nginx:
--pid-path=/var/run/nginx.pid \
--lock-path=/var/lock/nginx.lock \
Can somebody shed some light on this one?

Stann
- 2,209
106
votes
3 answers
How to install dig on CentOS?
I can't find the dig command on my new CentOS installation. I've tried dnf install dig but it say that it cannot find the package.
How do I install dig on CentOS?

Mikael Dúi Bolinder
- 4,032
105
votes
5 answers
How to check if a user can access a given file?
*nix user permissions are really simple, but things can get messy when you have to take in account all the parent directory access before reaching a given file. How can I check if the user has enough privileges? If not, then which directory is…

Metalcoder
- 1,195
105
votes
11 answers
How to test whether a file uses CRLF or LF without modifying it?
I need to periodically run a command that ensures that some text files are kept in Linux mode. Unfortunately dos2unix always modifies the file, which would mess file's and folder's timestamps and cause unnecessary writes.
The script I write is in…

Adam Ryczkowski
- 5,641
105
votes
5 answers
How to specify key in SSHFS?
I've got a question that I've not been able to find an answer for. I have two computers, both of which run Ubuntu Linux 12.04. I have set up my first computer ("home") to be able to SSH into my second computer ("remote") using public/private RSA key…

J L
- 1,183
105
votes
5 answers
How do you make samba follow symlink outside the shared path
This is Ubuntu server 10.04 64 and samba 3.4.7.
I have a shared directory /home/mit/share and another one /home/temp that I link into the shared one:
ln -s /home/temp /home/mit/share/temp
But on windows, after using internet, I cannot open S:/temp,…

mit
- 1,443