Most Popular
1500 questions
182
votes
18 answers
How do you restart php-fpm?
I need to reload my php.ini and there's nothing in the help dialog about restarting it.
Galen
- 1,973
180
votes
7 answers
What does Virtual memory size in top mean?
I am running top to monitor my server performance and 2 of my java processes show virtual memory of up to 800MB-1GB. Is that a bad thing?
What does virtual memory mean?
And oh btw, I have swap of 1GB and it shows 0% used. So I am confused.
Java…
kapso
- 2,143
- 4
- 15
- 7
180
votes
8 answers
Sudo as different user and running screen
Found out today that running screen as a different user that I sudo into won't work!
i.e.
ssh bob@server # ssh into server as bob
sudo su "monitor" -
screen # fails: Cannot open your terminal '/dev/pts/0'
I have a script…
sdot257
- 3,079
179
votes
5 answers
How to remove the path with an nginx proxy_pass
I have a running web-application at http://example.com/, and want to "mount" another application, on a separate server on http://example.com/en. Upstream servers and proxy_pass seem to work, but for one issue:
upstream luscious {
server…
berkes
- 2,375
179
votes
9 answers
Is it possible to generate RSA key without pass phrase?
I'm working with Apache2 and Passenger for a Rails project.
I would like to create a self-signed SSL Certificate for testing purposes.
sudo openssl rsa -des3 -in server.key -out server.key.new
When i enter the above command, it says
writing RSA…
diya
- 1,943
179
votes
6 answers
How to add dependency on a Windows Service AFTER the service is installed
I have a Windows Service that makes use of a SQL Server database. I don't have control over the installation of the service, but would like to add a dependency on the service to ensure that it starts after SQL server has started. (SQL server is…
Rick
- 1,935
179
votes
5 answers
What's the difference between authorized_keys and authorized_keys2?
Just wanted a quick summary of the differences between them and why there are two?
Jon
- 2,151
178
votes
11 answers
Run a .bat file in a scheduled task without a window
I have a scheduled task that starts a batch script that runs robocopy every hour. Every time it runs a window pops up on the desktop with robocopy's output, which I don't really want to see.
I managed to make the window appear minimized by making…
Tom Dunham
- 1,925
178
votes
9 answers
Is it possible to detach a process from its terminal? (Or, "I should have used screen!")
Possible Duplicate:
Can I nohup/screen an already-started process?
On Unix (specifically, Linux), I've started a job in a regular ssh->bash session. I'd like to leave work soon, but I now realize that the job is going to take several hours.
If I…
mike
- 4,123
177
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
- 14,084
176
votes
14 answers
Running a cron job manually and immediately
(I have already read How can I test a new cron script ?.)
I have a specific problem (cron job doesn't appear to run, or run properly), but the issue is general: I'd like to debug scripts that are cronned. I am aware that I can set up a * * * * *…
Pistos
- 3,293
176
votes
3 answers
Why can't a CNAME record be used at the apex (aka root) of a domain?
This is a Canonical Question about CNAMEs at the apices (or roots) of zones
It's relatively common knowledge that CNAME records at the apex of a domain are a taboo practice.
Example:
example.com. IN CNAME ithurts.example.net.
In a best case…
Andrew B
- 33,868
176
votes
10 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,279
175
votes
9 answers
Find name of Active Directory domain controller
How can I find out the name/IP address of the AD domain controller on my network?
user18682
- 2,321
174
votes
3 answers
tar - Remove leading directory components on extraction
How can you extract only the target dir and not the complete dir tree?
compress
tar cf /var/www_bak/site.tar /var/www/site
extract
tar xf /var/www/site.tar -C /tmp
This will produce:
/tmp/var/www/site
How is it possible to avoid the whole dir…
clarkk
- 2,135