Most Popular

1500 questions
52
votes
12 answers

Unzipping files that are flying in through a pipe

Can I make unzip or any similar programs work on the standard output? The situation is I'm downloading a zip file, which is supposed to be unzipped on the fly. Related issue: How do I pipe a downloaded file to standard output in bash?
Alex
  • 2,397
52
votes
4 answers

run rsync as root but keep user ownership

I would like to backup user files from one server to another with rsync. but I noticed that the user folders change to root. how can I keep the user permissions with rsync (running by root)?
edotan
  • 1,946
52
votes
3 answers

.nfsXXXX files appearing, what are those?

I have an application running (on RHEL5) that streams data onto an NFS share. Recently, I saw a lot of .nfsXXXX... (xxx being a hexadecimal number) appearing in its working directory, where the application writes hourly files and later moves them to…
nos
  • 2,468
52
votes
7 answers

Process runs slower as a scheduled task than it does interactively

I have a scheduled task which is very CPU- and IO-intensive, and takes about four hours to run (building source code, if you're curious). The task is a Powershell script which spawns various sub-processes to do its work. When I run the same process…
Charlie
  • 3,106
52
votes
4 answers

Linux/Windows/Unix/... file names: Which characters are allowed? Which are unescaped?

Which characters are allowed and which of them must be escaped on the command line in different operating systems?
52
votes
7 answers

How to add message that will be read with dmesg?

I am trying to write some custom messages in my dmesg output. I tried: logger "Hello" but this does not work. It exits without error, but no "Hello" appears int the output of: dmesg I am using a Fedora 9, and it seems that there is no…
calandoa
  • 1,295
  • 2
  • 12
  • 14
52
votes
12 answers

How to record server changes?

So we've all probably had this situation: you debug some problem, only to realize it was caused by a config change you made six months ago, and you can't remember why you did it. So you undo it and fix the problem, and now some other problem comes…
scobi
  • 879
52
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
  • 981
52
votes
6 answers

SSL for devices in local network

Initial question We make devices which run a webserver and the user can control some functionality of the device by browsing directly to the IP of the device. This can be a fixed IP when a direct WiFi or ethernet connection is used but in most cases…
Daan Pape
  • 621
  • 1
  • 4
  • 5
51
votes
6 answers

What are the pros and cons of having your own UPS attached to your own server hosted in a data center?

According to this comment by Tom O'Connor (slightly edited below): You can seriously cheese off a datacentre by putting an UPS inside your own rack. What are the risks to the data center should a customer (somehow) choose to do this?
51
votes
4 answers

How to install Docker on AWS EC2 instance with AMI (CE/EE Update)

What is the current way of installing Docker on an AWS EC2 instance running the AMI? There has been an announcement of Docker Enterprise Edition and now I want to know if anything has changed. Until now, I have been using yum install docker and do…
mxscho
  • 692
51
votes
2 answers

Redis Cluster: (error) MOVED

I have a Redis cluster with the following nodes: 192.168.0.14:6379 master (slots from 0 to 16383) 192.168.0.15:6379 slave (slots from 0 to 16383) 192.168.0.16:6379 master (without slots) Documentation says that any node can redirect queries to the…
Oleksandr
  • 763
51
votes
5 answers

How to allow a user to use journalctl to see user-specific systemd service logs?

I am running user-level services in Ubuntu 16.04 LTS. For example, I have my test.service located at ~/.config/systemd/user/test.service. I was able to run the service by doing systemctl --user start test.target However, when I try to read its log…
51
votes
4 answers

Linux: set up for remote sysadmin

Every now and then I get the odd request to provide remote support, troubleshooting and/or performance tuning on Linux systems. Larger companies often already have well established procedures to provide remote access to vendors/suppliers and I only…
HBruijn
  • 80,330
  • 24
  • 138
  • 209
51
votes
4 answers

Tcpdump on multiple interfaces

I need to capture traffic on a CentOS 5 server which acts as a web proxy with 2 wan interfaces and 1 LAN. In order to troubleshoot a weird proxy problem, I would like to have a capture of a full conversation. Since external connections are balanced…