Most Popular

1500 questions
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,509
  • 2
  • 12
  • 17
147
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…
Matt Sheppard
  • 1,579
  • 2
  • 11
  • 10
147
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,039
  • 10
  • 28
  • 39
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
  • 2
  • 10
  • 4
146
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,826
  • 8
  • 36
  • 40
146
votes
11 answers

best way to clear all iptables rules

I currently have this snippet: # flush all chains iptables -F iptables -t nat -F iptables -t mangle -F # delete all chains iptables -X Is there a possibility that some impervious rule will stay alive after running this? The idea is to have a…
kagali-san
  • 1,991
  • 5
  • 17
  • 20
146
votes
6 answers

Show full process name in top

I'm running a Rails stack on Ubuntu. When I call ps -AF, I get a descriptive process name set by the Apache module like 00:00:43 Rails: /var/www... which is really helpful in diagnosing load issues. But when I call top, the same process shows up…
Ben K.
  • 2,379
  • 4
  • 18
  • 15
146
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,172
  • 10
  • 37
  • 33
145
votes
3 answers

ssh-keygen does not create RSA private key

I'm trying to create a private key and having an issue. When I use ssh-keygen -t rsa -b 4096 -C "[email protected]", I get a private key in the following format. -----BEGIN OPENSSH PRIVATE…
Moon
  • 2,123
  • 4
  • 24
  • 23
145
votes
2 answers

Is it possible to make Nginx listen to different ports?

I created one Nginx with one Linux Azure VM, is it possible to make nginx listen to different ports so that when I change the port number, the content would be different. I found there would be a collision if I created two or more ports related to…
billcyz
  • 1,720
  • 3
  • 13
  • 16
145
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,198
  • 2
  • 16
  • 23
144
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,508
  • 18
  • 73
  • 87
144
votes
3 answers

Difference between OpenSSH internal-sftp and sftp-server

Why are there two ways to setup SFTP with OpenSSH and when to use which? Is there any difference between them? I mean the first one is using a lib from OpenSSH and the second one says "use the internal", so it is also OpenSSH? Subsystem sftp…
Denny Crane
  • 1,623
  • 2
  • 12
  • 9
144
votes
8 answers

How do I rename a task in Task Scheduled on Windows Server 2008 R2

I have some tasks in the Task Scheduler on Windows 2008 R2. I created them as the admin and I'm logged in as the admin. I have no easy way to rename the tasks. The only way I can is to export the task config to a XML file and re-import to a new…
Mark
  • 2,041
  • 6
  • 19
  • 18
143
votes
9 answers

Find out symbolic link target via command line

Say that I setup a symbolic link: ln -s /root/Public/mytextfile.txt /root/Public/myothertextfile.txt is there a way to see what the target of myothertextfile.txt is using the command line?
Jared
  • 1,577
  • 3
  • 12
  • 12