Most Popular

1500 questions
151
votes
9 answers

How to dump a Microsoft SQL Server database to a SQL script?

Is there any way to export a Microsoft SQL Server database to a SQL script? I'm looking for something which behaves similarly to mysqldump, taking a database name, and producing a single script which will recreate all the tables, stored procedures…
151
votes
8 answers

How can I port forward with iptables?

I want connections coming in on ppp0 on port 8001 to be routed to 192.168.1.200 on eth0 on port 8080. I've got these two rules -A PREROUTING -p tcp -m tcp --dport 8001 -j DNAT --to-destination 192.168.1.200:8080 -A FORWARD -m state -p tcp -d…
Stu
  • 2,258
150
votes
8 answers

Is there a reason to use an SSL certificate other than Let's Encrypt's free SSL?

Let's Encrypt are providing free SSL certificates. Are there any downsides compared to other, paid certificates e.g. AWS Certificate Manager?
ripper234
  • 6,232
150
votes
3 answers

What's the meaning of '@' in a DNS zone file?

I have the following data in my DNS zone file for my domain: $ORIGIN mydomain.com. @ IN A 208.X.Y.Z mail IN A 208.X.Y.Z ... etc.. What does the @ line mean? I know what an A record is.. but a host with an ampersand at…
Pure.Krome
  • 6,698
150
votes
9 answers

Monday morning mistake: sudo rm -rf --no-preserve-root /

Please note: The answers and comments to this question contains content from another, similar question that has received a lot of attention from outside media but turned out to be hoax question in some kind of viral marketing scheme. As we don't…
Jonas Bylov
  • 1,613
150
votes
7 answers

Meaning of directories on Unix and Unix like systems

I've been using Linux for a couple of years now but I still haven't figured out what the origin or meaning of some the directory names are on Unix and Unix like systems. E.g. what does etc stand for or var? Where does the opt name come from? And…
Luke
  • 3,916
149
votes
16 answers

What's the reverse DNS command line utility?

What's the command to find the name of a computer given its IP address? I always forget what this command is, but I know it exists in Windows and I assume it exists on the *nix command-line.
149
votes
8 answers

What port should I open to allow remote desktop?

What port(s) should I open/NAT to allow me to use Remote Desktop?
Kjensen
  • 1,129
148
votes
3 answers

How can I rename a Unix user?

I have a user named old_username and I want him to be named new_username, but I don't want to change his numeric user ID. How can I accomplish this?
Szymon Jeż
  • 3,837
148
votes
12 answers

Should servers be turned off at night?

There is a server that is used from 4:30 am in the morning until ~ 22:00. Should it be turned off? I think that it is a server and that it won't have a problem to stay on, but serious professors are telling me that it is dangerous and that HD can…
GorillaApe
  • 1,369
147
votes
25 answers

How to recover from "Too many Authentication Failures for user root"

I've done several attempts to establish SSH-connecton for user root@host using putty terminal. While doing so I specified wrong credentials several times and after that I've specified them correctly, and then after the credentials were accepted the…
user11722
  • 1,633
147
votes
9 answers

Keeping a linux process running after I logout

I'm connecting to a Linux machine through SSH, and I'm trying to run a heavy bash script that makes filesystem operations. It's expected to keep running for hours, but I cannot leave the SSH session open because of internet connections issues I…
doc_id
  • 1,675
  • 2
  • 14
  • 23
147
votes
5 answers

Rsync difference between --checksum and --ignore-times options

Can anyone clarify the differences between the --checksum and --ignore-times options of rsync? My understanding is as follows: --checksum If the file size and time match, it will do a checksum at both ends to see if the files are really…
Andy Madge
  • 1,737
147
votes
6 answers

How to see active connections and "current activity" in PostgreSQL 8.4

I'm investigating an issue with DB connections being left open indefinitely, causing problems on the DB server. How do I see currently open connections to a PostgreSQL server, particularly those using a specific database? Ideally I'd like to see…
EMP
  • 5,234
146
votes
3 answers

How can I upgrade to Java 1.8 on an Amazon Linux Server?

I tried sudo yum update but it just keeps java "1.7.0_75". I need 1.8 for it to work with another application but can't figure out how to upgrade it. Do I need to manually install it somehow? There's not much information on this on the internet as…
K_dar
  • 1,463