Most Popular

1500 questions
173
votes
11 answers

Run an interactive bash subshell with initial commands without returning to the ("super") shell immediately

I want to run a bash subshell, (1) run a few commands, (2) and then remain in that subshell to do as I please. I can do each of these individually: Run command using -c flag: $> bash -c "ls; pwd; " however, it immediately…
SABBATINI Luca
  • 1,731
  • 2
  • 11
  • 3
172
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,873
  • 2
  • 14
  • 8
169
votes
10 answers

How bad is IPv4 address exhaustion really?

For years the press has been writing about the problem that there are now very few IPv4 addresses available. But on the other hand, I'm using a server hosting company which gladly gives out public IPv4 addresses for a small amount of money. And my…
oz1cz
  • 1,575
  • 3
  • 11
  • 10
168
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…
168
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,251
  • 4
  • 17
  • 9
168
votes
4 answers

Getting "Cannot ioctl TUNSETIFF tun: Operation not permitted" when trying to connect to OpenVPN

I'm trying to setup an OpenVPN Access Server in AWS using the market place AMI, but I;m struggling to connect to it. The access server is up and running. I've also added a user with Auto-Login and generated the relevant client config and…
Stephen Melrose
  • 5,905
  • 5
  • 25
  • 22
168
votes
5 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,825
  • 2
  • 13
  • 6
166
votes
2 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,035
  • 8
  • 24
  • 36
165
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,205
  • 3
  • 18
  • 19
164
votes
11 answers

bash: print stderr in red color

Is there a way to make bash display stderr messages in red color?
kolypto
  • 11,058
  • 12
  • 54
  • 66
163
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
  • 32,588
  • 12
  • 93
  • 131
163
votes
11 answers

How do I diff two text files in Windows Powershell?

I have two text files and want to find the differences between them using Windows Powershell. Is there something similar to the Unix diff tool available? Or is there another other way I haven't considered? I've tried compare-object, but got this…
Brian Willis
  • 3,619
  • 4
  • 21
  • 14
163
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,472
  • 23
  • 88
  • 143
163
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,871
  • 2
  • 23
  • 21
162
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,093
  • 6
  • 22
  • 21