Most Popular

1500 questions
51
votes
2 answers

Windows: redirect stdout and stderror to nothing

I have a command I am running produces a ton of output, I want to silence the output without writing to a file. I have used the following to send all output to a file: command > out.txt 2>&1 ... but again I don't want any file output: command >…
Alec Gorge
  • 627
  • 1
  • 5
  • 9
51
votes
5 answers

What's the difference between a Layer 2 & Layer 3 switch

What's the difference between a Layer 2 & Layer 3 switch? I've always wondered and never needed to know until now.
Jon Rhoades
  • 4,987
  • 3
  • 31
  • 48
51
votes
3 answers

Find out which partition a directory is located on in Linux?

Is there a way to find out which partition a directory is located in? I know I can use df to list partitions and mount points but I need to be able to find out which partition any directory is located in with a simple command.
Camsoft
  • 961
  • 4
  • 12
  • 21
50
votes
6 answers

How do I back up an AWS S3 Bucket without versioning the source bucket

Is there any way to recover from accidental deletions of an Amazon S3 Bucket? We've got critical info in our buckets and I need to mitigate the risk of accidental or malicious deletions of the bucket itself. I know I can sync the entire bucket…
Nikhil Gupte
50
votes
6 answers

How to backup GPG?

What are the critical files I need to backup from GPG? I guess my private key would qualify of course, but what else?
jldupont
  • 1,849
  • 4
  • 24
  • 27
50
votes
3 answers

loginctl enable-linger/disable-linger ... but reading linger-status?

I know how to enable/disable lingering with loginctl. But up to now I found no way to query the status of a user. I want to know: Is lingering enable for user foo? How can I access this information?
guettli
  • 3,591
  • 17
  • 72
  • 123
50
votes
14 answers

Linux - What directories should I exclude when backing up a server?

I'm backing up a Linux server and storing it on another server. I began with a simple rsync -aPh --del server.example.com:/ /mnt/backup Then someone pointed out that I shouldn't back up /proc, since you don't want to restore the /proc of one…
Amandasaurus
  • 31,471
  • 65
  • 192
  • 253
50
votes
4 answers

Can someone using the same DNS server as me hijack my domains?

When I register a new domain, I send it to my hosting provider by assigning it its domain name servers in the registar's settings. For example, with Digital Ocean, I input the…
50
votes
5 answers

unable to connect to public postgresql rds instance

I created a basic test PostgreSQL RDS instance in a VPC that has a single public subnet and that should be available to connect over the public internet. It uses the default security group, which is open for port 5432. When I try to connect, it…
Edward Q. Bridges
  • 1,241
  • 1
  • 9
  • 9
50
votes
2 answers

Use a specific forwarded key from SSH-agent?

Let's say I have a key for Github, along with other keys. I've added lots of keys to my ssh agent (ssh-add -L returns lots of lines) at my home computer A. In my .ssh/config I have set up which key to use with which host, so e.g. ssh -T -vvv…
danmichaelo
  • 602
  • 1
  • 5
  • 8
50
votes
10 answers

How do I get the MD5 of a file on Windows?

I need to check the MD5 of a few files on Windows. Any recommendations on either a command line or an explorer-plugin utility?
Daniel C. Sobral
  • 5,713
  • 6
  • 34
  • 48
50
votes
1 answer

How to verify an imported GPG key

I'm new to this PGP thing. Here are my questions: Verification When I do this, I'm given the message "This key is not certified with a trusted signature". Is there anyway to make it trusted and better yet what's the proper way for doing…
user192702
  • 931
  • 5
  • 15
  • 22
50
votes
3 answers

SElinux: allow httpd to connect to a specific port

My system is running CentOS 6.4 with apache2.2.15. SElinux is enforcing and I'm trying to connect to a local instance of redis through my python/wsgi app. I get Error 13, Permission denied. I could fix this via the command: setsebool -P…
savagecitizen
  • 501
  • 1
  • 4
  • 3
50
votes
1 answer

Will increasing net.core.somaxconn make a difference?

I got into an argument on the net.core.somaxconn parameter: I was told that it will not make any difference if we change the default 128. I believed this might be enough proof: "If the backlog argument is greater than the value in…
petermolnar
  • 1,029
  • 1
  • 12
  • 17
50
votes
4 answers

How do I authenticate with LDAP via the command line?

The LDAP server is hosted on Solaris. The client is CentOS. OpenLDAP/NSLCD/SSH authentication via LDAP work fine, but I am not able to use the ldapsearch commands to debug LDAP issues. [root@tst-01 ~]# ldapsearch SASL/EXTERNAL authentication…
ujjain
  • 3,983
  • 16
  • 53
  • 91