mibus
  • Member for 12 years, 7 months
  • Last seen more than a month ago
Bash snippet to move all files in a directory into that directory
Accepted answer
19 votes

Your mv * ./new_directory command will actually work; it'll just print a warning that it can't move that directory into itself.

View answer
What does it take for a sysadmin to have happy customers?
10 votes

I think that if you want your customers to be happy with you, the #1 thing is communication. Make sure that you're talking to them. When they come to you, make sure you're both clear on what's wanted,...

View answer
Ubuntu8.10 - keep services running after logoff
6 votes

Normally, those services would run in the background, starting before the first login, and continuing after the user logs out. Ubuntu Desktop is really Ubuntu Server plus X and Gnome :) How are you ...

View answer
Should old servers be retired
5 votes

Probably - but with caution and attention to detail. Things to keep in mind: Can you still buy parts to repair hardware faults? Is the OS and software still recent enough to be getting supported ...

View answer
Why su to root instead of logging in as root?
4 votes

If you want to create an audit trail, and don't want to fall victim to the "sudo su -" or "sudo vim foo.txt" problems mentioned here, you can use "sudosh". Hand out root access via sudo, but make the ...

View answer
What's a simple way to list the immediate subdirectories of a given location?
3 votes

ls -d */ "-d" means don't delve into the directories, the "*/" only matches directories.

View answer
Mail server blacklisted
3 votes

It sounds like either: Your mail server is acting as an "open relay". A mail server should only accept mail that is for a domain it is responsible for (ie., your domain), OR from an IP within your ...

View answer
Subnet Static IP in linux?
2 votes

To set your machine up with a static IP address, edit /etc/network/interfaces Add lines like: auto eth0 iface eth0 inet static address 192.168.111.133 netmask 255.255.255.0 ...

View answer
GCC compile result from Bash script
2 votes

gcc -o foo foo.c && echo OK :)

View answer
What are the minimum specs for Ubuntu server to host a subversion repository?
Accepted answer
2 votes

If you don't have a large repository or lots of users doing full checkouts multiple times per day, you really don't need much at all. I ran a decent-sized repository (~20GB maybe? 4-5 regular users) ...

View answer
MySQL Optimization
Accepted answer
2 votes

I suspect you're hitting table locks, since your CPU and your iowait is so low. InnoDB may help, but ultimately you're best served by fixing the application running on top. You should get stats on ...

View answer
Is it important to reboot Linux after a kernel update?
2 votes

In the event that you don't reboot, you should ensure that the new kernel isn't the default one to start on boot. The last thing you want is an untested kernel being used for production after an ...

View answer
What's the effect of standby (spindown) mode on modern hard drives?
2 votes

It's going to depend on the workload. You probably only want to spin the drive down, if it's not likely to be used for quite a while...

View answer
puppet startup error
Accepted answer
1 votes

Check that it can talk to puppet:8140 correctly, and check that the server is definitely working OK. (If this is your first client, maybe the server-side SSL stuff is broken?)

View answer
Hanging page loads every n loads
1 votes

Bind something like strace or gdb to all of the apache worker processes, and reload pages in the browser one breaks. Then you'll get to see more info about what it's doing when it's crashing. When ...

View answer
Routing application traffic through specific interface
1 votes

I believe the best option is to bind each application to a different IP, and use source-based routing to change which interface packets from that source IP go out via. The general idea is that you ...

View answer
How to change from own Internal/Extrernal DNS to use an outsourced service like DNS Made Easy?
1 votes

Yes, you can do pretty much what you describe. At least some DNS providers can also act as DNS slaves (rather than masters) - so you could keep your DNS hosted locally, as well as having a usable ...

View answer
Memcached failover
Accepted answer
1 votes

As a general rule, it's normally expected that you just accept that the cache may or may not have what you want. It depends on the scenario, but it sounds like you might benefit from a higher one. ...

View answer
Can you break down relative MySQL load by "source" of query?
1 votes

SHOW FULL PROCESSLIST; That shows you the processes and runtimes. To differentiate the source, you can use different logins for each 'realm', OR prepend the realm in all queries. eg, this is a valid ...

View answer
Linux "ls" lists no files
1 votes

Any chance your machine has been hacked? It's a bit blatant, but I've seen attacks that disable things like netstat to hide themselves. Do you have disk space free? (df -h)

View answer
QMail keeps shutting down ... how to check and restart?
1 votes

daemontools is a good option. Another one - that doesn't involve changing the way your service starts, and thus might be easier to add in to production, is "monit". http://mmonit.com/monit/ You can ...

View answer
What is the one thing you wish you knew when you first started being a system administrator?
1 votes

Be as paranoid as you can afford - double-check what you're about to do, check backups before re-installing a machine, and always have a fallback plan. Be friendly and helpful - the people around ...

View answer
BIND 9 transfer of domain zones problems
Accepted answer
0 votes

It looks like wherever you're running the command, it doesn't have an "rndc key" available to tell "ns2" that it needs to reload the configuration. Presumably CPanel should take care of the ...

View answer
Bind: non existing PTR record
0 votes

BIND should be caching the NXDOMAIN response. There's a whole RFC dedicated to negative caching. There's a chance the far-end's zone SOA has the value set too low. Read more on SOA settings, ...

View answer
Let CGI-PHP load a non-default shared library
0 votes

Can you replace the php-cgi with a shell-script wrapper that sets the environment you need, then executes the real php-cgi binary?

View answer
Extract duplicity difftar files manually
0 votes

IIRC, for each file you extract the directory named after the file. Then just use "cat" to reassemble the pieces. (eg, "cat my-filename.ext/* > my-new-file.ext"). That works for full backups, not ...

View answer
VMware ESX, iSCSI Targets - Redundancy
Accepted answer
0 votes

IRC, DRBD can stream asynchronously to a third box, allowing a final level of data protection. Then you can bring up iSCSI on that box, or migrate data elsewhere, or whatever.

View answer
Linux Filesystem
0 votes

Have you considered splitting your volume up? Then you can run parallel fscks (or fewer, if you have some clean FSs). eg. 3 x 400GB volumes = 1.2TB. Use symlinks or change homedir paths, to put files ...

View answer
mysql crashes
0 votes

How many active connections are there? Use "mysqladmin processlist" to find out. It's entirely possible that idle connections aren't being closed -- if that's the case, turning off "persistent ...

View answer
How to minimise bind9 memory footprint?
0 votes

Are you using bind for authoritative hosting of domains, or for a caching resolver? If for authoritative hosting, turn off recursion (there's no need for a cache if you're not doing recursion); or ...

View answer