Most Popular
1500 questions
161
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,194
- 19
- 55
- 75
161
votes
5 answers
Force dig to resolve without using cache
I'm wondering if there is a way to query a DNS server and bypass caching (with dig). Often I change a zone on the DNS server and I want to check if it resolves correctly from my workstation. But since the server caches resolved requests, I often get…
Daniel
- 3,047
- 5
- 22
- 27
160
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,927
- 2
- 14
- 12
158
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,579
- 2
- 13
- 12
156
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,763
- 10
- 34
- 29
156
votes
4 answers
Find the location of a systemd unit file service
There are many different places where systemd unit files may be placed. Is there a quick and easy way to ask systemd where it read a service’s declaration from, given just the service name?
Joachim Breitner
- 3,779
- 3
- 18
- 21
156
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,151
- 2
- 17
- 13
156
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,661
- 2
- 11
- 4
155
votes
2 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
- 115,471
- 20
- 215
- 297
155
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,599
- 3
- 19
- 18
154
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
154
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,677
- 2
- 13
- 12
154
votes
13 answers
Are networks now faster than disks?
This is a software design question
I used to work on the following rule for speed
cache memory > memory > disk > network
With each step being 5-10 times the previous step (e.g. cache memory is 10 times faster than main memory).
Now, it seems that…
pm100
- 1,635
- 3
- 11
- 9
152
votes
5 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,016
- 4
- 16
- 13
152
votes
9 answers
What version of RHEL am I using?
From the shell and without root privileges, how can I determine what Red Hat Enterprise Linux version I'm running?
Ideally, I'd like to get both the major and minor release version, for example RHEL 4.0 or RHEL 5.1, etc.
Arthur Ulfeldt
- 3,249
- 9
- 33
- 40