Most Popular

1500 questions
85
votes
6 answers

What does passing the -xe parameters to /bin/bash do

Exactly what the title says. I'm not having much luck finding the proper documentation to see what -xe does in the following use case: #!/bin/bash -xe what do those parameters do and where it is documented?
imaginative
  • 1,981
85
votes
11 answers

IIS 7.5 (Windows 7) - HTTP Error 401.3 - Unauthorized

I'm trying to test my ASP.Net website on localhost and I'm getting this error: HTTP Error 401.3 - Unauthorized You do not have permission to view this directory or page because of the access control list (ACL) configuration or encryption settings…
85
votes
8 answers

How can I list my open ports on Debian?

What is the command to display a list of open ports on a Debian server? I tried netstat -a | egrep 'Proto|LISTEN' but I would like something more specific that actually lists the port number.
leonel
  • 989
85
votes
11 answers

How to remove invalid characters from filenames?

I have files with invalid characters like these 009_-_�%86ndringshåndtering.html It is a Æ where something have gone wrong in the filename. Is there a way to just remove all invalid characters? or could tr be used somehow? echo…
Sandra
  • 10,563
85
votes
4 answers

logrotating files in a directories and its subdirectories

Is it possible to get logrotate to consider logfiles in a directory and all its subdirectories? (i.e. without explicitly listing the subdirectories.)
ithinkihaveacat
  • 1,634
  • 3
  • 14
  • 18
84
votes
7 answers

What is the Windows equivalent of Unix "whoami" command?

Is there a Windows equivalent of Unix "whoami" command? If so, what is it?
Kip
  • 3,530
84
votes
1 answer

How does "restart: always" policy work in docker-compose?

I have docker compose file with PostgreSQL and my application, like this: version: '3' services: postgresql: image: postgres:9.6.6 ports: - 9932:5432 expose: - "5432" environment: - POSTGRES_PASSWORD=pass …
84
votes
14 answers

ssh connection takes forever to initiate, stuck at "pledge: network"

Connection to one of my servers using ssh takes more than 20 seconds to initiate. This is not related to LAN or WAN conditions, since connection to itself takes the same (ssh localhost). After connection is finally establised, it is super fast to…
M-Jack
  • 1,376
  • 2
  • 11
  • 16
84
votes
8 answers

Route 53 doesn't allow adding DKIM keys because length is too long

Here is how I enter the value for DKIM key: "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwztXzIUqic95qSESmnqX U5v4W4ENbciFWyBkymsmmSNOhLlEtzp/mnyhf50ApwCTGLK9U7goo/ijX/wr5roy…
Gasim
  • 1,097
84
votes
7 answers

Using variables in Apache config files to reduce duplication?

Is it possible to use variables in Apache config files? For example, when I'm setting up a site with Django+WSGI, the config file might look like: Order allow,deny Allow from all Alias /foo/static…
84
votes
6 answers

How to accurately check if package is installed in yum?

I keep getting answers like: yum list installed | grep bind or rpm -qa | grep bind But that is not accurate as I'm getting a list of few other bind packages like…
checksum
  • 1,035
  • 1
  • 11
  • 15
84
votes
2 answers

Why is rsync skipping the main directory?

I'm trying to use rync locally (on a windows machine) to a remote server (my osx box) in order to test a remote deploy build script. I've done rsync before just fine between 2 linux servers, but I'm having problems now. Here is the output: $ rsync…
chrisan
  • 997
84
votes
2 answers

How can I zip/compress a symlink?

Is it possible and how can I zip a symlink from a linux shell?
DucDigital
  • 1,541
  • 4
  • 18
  • 26
84
votes
9 answers

How to make scp copy hidden files?

I often use SCP to copy files around - particularly web-related files. The problem is that whenever I do this, I can't get my command to copy hidden files (eg, .htaccess). I typically invoke this: scp -rp src/ user@server:dest/ This doesn't copy…
rascher
  • 1,148
84
votes
4 answers

Automate the installation of postfix on Ubuntu

My system configuration script does an apt-get install -y postfix. Unfortunately the script is halted when the postfix installer displays a configuration screen. Is there a method to force postfix to use the defaults during installation so that an…
sutch
  • 1,026