Most Popular

1500 questions
47
votes
4 answers

How do I see du in GB instead of MB in linux?

This works: du -cshm . But this fails: du -cshg . How can I see it in unit of GB?
apache
  • 3,617
  • 7
  • 30
  • 25
47
votes
3 answers

How to view hidden files using Linux `find` command

On a Linux server, I need to find all files with a certain file extension in the current directory and all sub-directories. Previously, I have always used the following command: find . -type f | grep -i *.php However, it doesn't find hidden files,…
Tom
  • 4,538
47
votes
5 answers

Faking the date for a specific shell session

I'm certainly trying to achieve something weird here, but I want to fake the date locally for a shell session on GNU/Linux. I need to black-box test how a program behaves at different dates, and modifying the system-wide date can have unwanted side…
nicoulaj
  • 1,285
47
votes
10 answers

Which is better: RAID5 + 1 Hotspare / RAID6?

Just curious, I have 6 x 1TB 7200RPM Near Line SAS for my new server. I can either configure it as RAID5+1 Hot Spare or RAID6. What should I choose?
Raptor
  • 1,055
46
votes
8 answers

Locked out of my own server: getting "Too many authentication failures" right away when connecting via ssh

I have an AWS EC2 Ubuntu instance for pet projects. When I tried logging in one day, this error results: ~$ ssh -i"/home/kona/.ssh/aws_kona_id" kona@server.akona.me -p22 Enter passphrase for key '/home/kona/.ssh/aws_kona_id': Received disconnect…
46
votes
6 answers

IIS Log Request Body / POST Data

Does anyone know how I could get IIS to log POST data or the entire HTTP request?
Jim
46
votes
23 answers

Finding the Public IP address in a shell script

I can find my IP address using ifconfig or hostname -i command. But how do I find my Public IP? (I have a static public IP but I want to find it out using unix command)
shantanuo
  • 3,709
46
votes
3 answers

How to set system time dynamically in a Docker container

Is there any way to set a Docker containers system time dynamically (at run time) without effecting the host machine? Using hwclock --set --date "Sat Aug 17 08:31:24 PDT 2016" gives the following error: hwclock: Cannot access the Hardware Clock via…
Vingtoft
  • 1,687
46
votes
3 answers

How to allow ssh to root user only from the local network?

I've installed Google-Authenticator on a CentOS 6.5 machine and configured certain users to provide OTP. While editing /etc/ssh/sshd_config I saw a directive " PermitRootLogin " which is commented out by default. I would like to set "…
Itai Ganot
  • 11,027
46
votes
4 answers

How is Docker Compose version 2 "volumes" syntax supposed to look?

With Docker Compose v1.6.0+, there now is a new/version 2 file syntax for the docker-compose.yml file. The changes include a separate top level key named volumes . This allows to "centralize" volume definitions in one place. What I am trying to do…
kaiser
  • 1,251
46
votes
4 answers

Ubuntu 15.10 Server; W: Possible missing firmware /lib/firmware/ast_dp501_fw.bin for module ast

I'm running Ubuntu 15.10 server on a Asrock E3C226D2I board. When I get a kernel update or run update-initramfs -u I get a warning about missing firmware: root@fileserver:~# update-initramfs -u update-initramfs: Generating…
wouter
  • 563
46
votes
5 answers

Why are many admins using 'Turn off Automatic Root Certificates Update' Policy?

My company distributes a Windows Installer for a Server based product. As per best practices it is signed using a certificate. In line with Microsoft's advice we use a GlobalSign code signing certificate , which Microsoft claims is recognised by…
46
votes
10 answers

Point multiple IP addresses to a single host name

In Windows System, there is this file at C:\WINDOWS\system32\drivers\etc\hosts . This file allows us to default a specific IP address to a host name. The issue now is whether I can set multiple IP addresses to a host name. For example, can I do…
46
votes
1 answer

How does the DNS protocol switch from UDP to TCP?

Before anyone asks: I've seen When do DNS queries use TCP instead of UDP? and it doesn't answer my question. All I keep hearing is " if the answer is too long, DNS will use TCP ". This does not explain how it happens though. So here's the situation:…
46
votes
9 answers

How can I stop ansible from writing passwords to the logfiles?

I am setting up a MySQL server and want Ansible to set the mysql-root password during installation. With the help of the internet I came up with this solution: - name: Set MySQL root password before installing debconf: name='mysql-server'…
claus
  • 681
1 2 3
…
99
100