Most Popular
1500 questions
166
votes
10 answers
GRANT SELECT to all tables in postgresql
Is there a one-liner that grants the SELECT permissions to a new user postgresql?
Something that would implement the following pseudo-code:
GRANT SELECT ON TABLE * TO my_new_user;
Adam Matan
- 13,574
165
votes
6 answers
List of files installed from apt package
How do I get a list of files that were or will-be installed when I apt-get a package? Conversely, can I find what package(s) caused a particular file to be installed?
David Nehme
- 2,166
165
votes
8 answers
What does 'set -e' do, and why might it be considered dangerous?
This question has appeared on a pre-interview quiz and it's making me crazy. Can anyone answer this and put me at ease? The quiz has no reference to a particular shell but the job description is for a unix sa.
again the question is simply...
What…
egorgry
- 2,911
164
votes
9 answers
How to remove empty/blank lines from a file in Unix (including spaces)?
How do I remove empty/blank (including spaces only) lines in a file in Unix/Linux using the command line?
contents of file.txt
Line:Text
1:
2:AAA
3:
4:BBB
5:
6:CCC
7:
8:DDD
output desired…
Michael Ellick Ang
- 2,159
163
votes
12 answers
Best practices for setting a cron job for Let's Encrypt (Certbot) renewal?
Is this correct way to set cron for renewal of Let's Encrypt cert in Apache2 ?
I use Ubuntu 16.04.
@monthly letsencrypt renew && service apache2 reload
user3448600
- 1,629
- 3
- 15
- 12
162
votes
5 answers
Are SSD drives as reliable as mechanical drives (2013)?
SSD drives have been around for several years now. But the issue of reliability still comes up.
I guess this is a follow up from this question posted 4 years ago, and last updated in 2011. It's now 2013, has much changed? I guess I'm looking for…
hookenz
- 14,602
- 23
- 91
- 145
162
votes
18 answers
What's the best way to check if a volume is mounted in a Bash script?
What's the best way to check if a volume is mounted in a Bash script?
What I'd really like is a method that I can use like this:
if
then
else
fi
Mark Biek
- 1,947
160
votes
3 answers
What causes the 'Connection Refused' message?
This is a Canonical Question about Connection Refused
We see a lot of questions to the effect
When I try to connect to a system I get a message
Connection refused
Why is this ?
user9517
- 116,228
159
votes
8 answers
Amazon Cloudfront with S3. Access Denied
We're trying to distribute out S3 buckets via Cloudfront but for some reason the only response is an AccessDenied XML document like the following:
Access Denied
…
AccessDenied
Jordan Adams
- 1,691
158
votes
12 answers
Is there a global, persistent CMD history?
Sometimes I forget how the exact syntax of a CMD command looks and then I would like to search my own CMD history. Clearly, within the same session, you can browse it with the up and down arrow keys but what about the history of former CMD sessions?…
raoulsson
- 4,813
158
votes
5 answers
How to check if an RSA public / private key pair match
I have two files, id_rsa and id_rsa.pub. What command can be used to validate if they are a valid pair?
Ryan
- 6,021
158
votes
5 answers
How to output variable in nginx log for debugging
I am testing nginx and want to output variables to the log files. How can I do that and which log file will it go (access or error).
lulalala
- 1,727
158
votes
2 answers
Sometimes PowerShell stops sending output until I press enter. Why?
Periodically I notice PowerShell seems to take forever to finish doing whatever it is I told it to do until it occurs to me to "wake it up" by pressing enter. This is not the fault of any one process as best I can tell, as I have even run custom…
Nathan Ridley
- 2,629
157
votes
6 answers
How can I debug a docker container initialization?
I had an issue with a container, even though it builds perfectly it does not properly start. The cause is a workaround I've added to the Dockerfile (for having a self-configured /etc/hosts routing)
RUN mkdir -p -- /lib-override /etc-override && cp…
estani
- 2,171
157
votes
9 answers
Command line to list users in a Windows Active Directory group?
Is there a command line way to list all the users in a particular Active Directory group?
I can see who is in the group by going to Manage Computer --> Local User / Groups --> Groups and double clicking the group.
I just need a command line way to…
Flyer