Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs.

learn more… | top users | synonyms

8
votes
4answers
5k views

Where should I place group shared files on a Linux system?

I'm migrating a lot of small custom scripts and data from a Linux system to another. On the old system we had a shared user that owned most of the files and they where located in that users /home, ...
8
votes
3answers
10k views

How to enable color in Vim over SSH?

I have two remote servers: Server 1: Linux 2.6.18-238.12.1.el5PAE i686 / VIM - Vi IMproved - version 7.0.237 Server 2: Linux 2.6.18-338.19.1.el5.lve0.8.36 x86_64 / VIM - Vi IMproved version 7.0.237 ...
8
votes
4answers
5k views

List supported terminal types?

Is there a portable way to list supported terminal types on all *N*X systems? If not, what's the best way to get this list on Solaris?
8
votes
4answers
5k views

How do I find and report on broken symbolic links automatically?

As tidy sysadmins, we like to ensure that the little things are just as well covered as the big things (when time permits). One of these things is ensuring that our systems aren't full of broken ...
8
votes
4answers
27k views

How to recover free space on deleted files without restarting the referencing processes?

When big files are deleted on a server, the files might still be referenced by processes, so the file system doesn't have more free space. I tried to use lsof, but it seems it didn't list the deleted ...
8
votes
3answers
808 views

Password similarity

I wanted to change my password on a unix machine. I did a normal "passwd" and typed in my old and my new password. Then the machine came back to me with the following message: BAD PASSWORD: is too ...
8
votes
2answers
761 views

Break all hardlinks within a folder

I have a folder which contains a certain number of files which have hard links (in the same folder or somewhere else), and I want to de-hardlink these files, so they become independant, and changes to ...
8
votes
8answers
14k views

what is the difference between linux and solaris OS? [closed]

What is the basic difference between Linux and Solaris? As both the OS are derived from UNIX so where lies the difference between Linux and Solaris? Are they because of creation by different ...
8
votes
4answers
1k views

Analyze and optimize crontabs [closed]

Is there a tool to graph, analyze and help optimize crontab execution? To clarify, I'm thinking of a tool which would generate a graph of when cron jobs are executed, and help the sysadmin reorganize ...
8
votes
1answer
2k views

Can i call pushd/popd and prevent it printing the stack?

After calling pushd/popd in bash, it will print off the current directory stack. Is there any way to prevent this behaviour, so that it will act 'quitely'? This sort of noise in a command is uncommon ...
8
votes
4answers
18k views

What's a proper way of checking if a PID is running?

I have a .pid file, and I need to check if the process is running. So far I found two options kill -0 `cat something.pid` which prints out an error if the pid isn't running. I know this can be ...
8
votes
2answers
2k views

Monolithic vs Micro kernel

What are the differences between a monolithic kernel and a microkernel with respect to structure and security. My friend told me that Linux systems have monolithic kernel and thus are not easier to ...
8
votes
2answers
7k views

What's the purpose of kslowd?

I'm running Ubuntu 10.10: uname -a Linux mt-xps 2.6.35-22-generic #35-Ubuntu SMP Sat Oct 16 20:45:36 UTC 2010 x86_64 GNU/Linux When I run top, I occasionally see a "kslowd000" or similar process ...
8
votes
2answers
943 views

How to install mono in Linux server?

I would like to install mono in Linux server.I don't know Linux.I have to work in .net application which will run in Linux server.I would also like to know how can i run my first asp.net application ...
7
votes
8answers
7k views

Linux - use “su -” but keep the current directory

When I do su - to get to root, my current directory is set to root's home. Is there anyway to keep the current directory that I was in, much like sudo -s. Or is the answer to use sudo?
7
votes
9answers
14k views

Best terminal unix editor to suggest to someone? [closed]

What's the best terminal editor to suggest to a unix newbie? i.e. not vim or emacs. There are a few editors, joe, nano, etc. Some have easy to remember commands / keyboard shortcuts, others don't. I'...
7
votes
9answers
13k views

Bash snippet to move all files in a directory into that directory

I have a directory with lots of files and directories in it. In order to tidy it up, I'm going to put all those files into a directory, so I was going to do something like this: $ ls | wc -l 123 $ ...
7
votes
9answers
1k views

Which UNIX filesystem do you use and recommend for servers?

On Windows World NTFS is the king, but in the UNIX World there are many choices today: HFS+, ext3, ext4, zfs (maybe), reiserfs, reiser4, etc. What do you recommend, why and which are your remarks ...
7
votes
2answers
14k views

how to run cron job every 3 months?

What would be the crontab entry look like for a job that runs on the first day of every third month?
7
votes
3answers
4k views

Directory that a user can read, but root can't?

There's a directory underneath my homedir called ".gvfs". As my regular user account, I can read it just fine: ~ $ ls -lart ~raldi/.gvfs total 4 dr-x------ 2 raldi raldi 0 2009-05-25 22:17 . ...
7
votes
3answers
4k views

Non-recursive find on linux

I am trying to find all directories that are directly inside the current directory and older than a specific age. The trick is, I only want to consider the age of the immediate descendants of the ...
7
votes
6answers
3k views

What are a regular maintenance you need to perform on your Linux server?

I have a server that host few websites, I haven't done any maintenance for about 2 month other than looking at a couple logs and compressing them. Just wondering what are a regular maintenance you ...
7
votes
10answers
6k views

Scripting alternatives to Bash shell scripts

I have just migrated to a UNIX workstation. My memory of Bash shell scripts has faded since school and I find the syntax to be highly confusing. I am wondering what other scripting languages are ...
7
votes
2answers
3k views

should use sudo or just su root in server management?

Which approach is better? For desktop usage, it seems that sudo is better since: I can have a more consistent history as a normal user Don't need to remember two passwords, which is especially ...
7
votes
5answers
7k views

Command line SIP dialer

Is there a simple command line SIP dialer for unix which can connect to SIP server, make a call and play some media file (wav/mp3)? In ideal I would look like this: sip-dailer +1xxxxxxxxxx /path/to/...
7
votes
6answers
4k views

Monitor the shell activity of a user on your Unix system?

Trust, but verify. Let's say I want to hire someone a sysadmin, and give them root access to my Unix system. I want to disable X windows for them, only allow shell usage (through SSH, maybe), so that ...
7
votes
5answers
332 views

Failed line of communication… rebooting for morons?

I work at a large corporation where we use many legacy systems. To note some of the systems: HP-UX 10.20, Windows 2000, VMEBus systems, systems designed 30+ years ago that do not communicate via TCP/...
7
votes
6answers
6k views

improving rsync backup performance

What are the best techniques to improve rsync over ssh mirroring between unix boxes, assuming that one system will always have the master copy and the other system will always have a recent copy (less ...
7
votes
4answers
9k views

How to add a user without knowing the encrypted form of the password?

I use the following command to create a user in a linux machine: useradd -d /home/dummy -g idiots -m -p 12345689 dummy The user is created and the home directory as well. The problem is that I ...
7
votes
6answers
3k views

Linux/UNIX Server Setup Practices for /tmp

Based on what you all see out there what is a recommended configuration of /tmp on a server system and why. I've had discussions on these points over the years sometimes with basic disagreements. ...
7
votes
4answers
5k views

After deleting a large file, how long does it take `df` to pick up the change?

I deleted a 2.3GB log file on my Ubuntu server, and df doesn't seem to be picking up the change. Is there typically a delay before df can detect that a large file has been deleted?
7
votes
1answer
8k views

How do I find circular symbolic links?

I'm working on a HP-UX system and I want to find if there are any circular symbolic links. So far I'm using the command: ls -lrt `find ./ -follow -type l` But it's only doing ls -lrt on current ...
7
votes
4answers
14k views

In unix, what's the best way to reduce the size of a massive log file that is actively being written to?

On a linux server, I want to reduce the size of a log file which is several GB big. Cutting off the top half, or maybe the first million lines would work.
7
votes
2answers
1k views

Why can the root user edit read-only files, but a regular user with sudo access can't?

If you try to append to a file with no write permissions (say, the /etc/sudoers file which is is owned by root and has 0440 permissions), if you're the actual root user, this works. However, if you're ...
7
votes
5answers
441 views

I have about 20 servers…how do I manage the SSH keys and permissions of each?

I have database servers, web servers, SVN servers, etc. Often times I ssh among them...or they auto-ssh. How do I manage what server gets to log into which others?
7
votes
2answers
278 views

Is there a way of exporting fstab info for device which is currently mounted?

Does there exist any tool which can tell you what the fstab line for a mount should be? Ie. it looks at something which has been mounted manually and tells you the line which you would have to add to /...
7
votes
2answers
1k views

Sorting large binary files

Is there Unix utility for sorting large files containing fixed length binary records? In other words, I'm looking for something like sort(1) but for binary files with fixed length records. I could ...
7
votes
3answers
7k views

Tripwire and alternatives

I'm wondering if anybody could guide me here. I have 3 dedicated linux servers and want to install tripwire in order to track changes in the key files/folders in the filesystem Initial research has ...
7
votes
3answers
15k views

Enabling apt-get on a default Amazon EC2 instance which has yum installed

I'd like to call something like: sudo yum install apt to enable me to use apt-get as well as yum for installation. However this doesn't work. I get the following back: Loaded plugins: ...
7
votes
2answers
625 views

Unix sort for partially ordered data sets

So I have an enormously large file (around 10GB) and need to sort it, just like in using 'sort' utility, but kindof more effectively. Problem is, that I don't have memory, CPU power, time, nor free ...
7
votes
1answer
258 views

Is it possible to use perl, python, php, ruby or whatever to write init.d scripts?

I'm new to this SysOp stuff, so I'm wondering if it's possible to use other interpreted languages to write init.d scripts? The upfront diff for me is /bin vs. /usr/bin #!/bin/sh versus #!/usr/bin/...
7
votes
2answers
5k views

Mount a tar file - not possible?

It seems one cannot mount a tar file (read only), similarly as one mounts an ISO image file. At least, I have not found any implementation. It would be useful, for example to run a find command ...
7
votes
1answer
3k views

su: /bin/bash: Resource temporarily unavailable

Unable to switch user to postgres. Ulimit settings for postgres user is set with reasonable limits. We are not hitting max. No errors in /var/log/messages. Error: BETA -bash-4.2# sudo su - ...
7
votes
2answers
108 views

Setting timezone to UTC in unattended install

In FreeBSD, I'd like to set the timezone to UTC in an unattended way. If I run tzsetup, and select "yes" and "a" in the dialogs, for choosing UTC, I see that there are no /etc/localtime files present. ...
7
votes
1answer
335 views

Linux/Unix - /etc/sudoers - host definition

can anybody tell me in which case the sudo host definition is useful? I mean this part of a line in the sudoers file: bob host1 = NOPASSWD: reboot In which environment (except sudo via LDAP) do I ...
7
votes
2answers
1k views

Custom error message for sshd

Is it possible to set a custom error message for users denied to access a server? In fact, I'd like to only display this message if a user was rejected due to IP filter set in sshd_config. But one ...
7
votes
5answers
3k views

Replacement for NIS/YP

The company that I am working for is embarking on replacing the current locally developed NIS/YP structure with LDAP. We already have AD in house for the Windows stuff and would like to consider ...
7
votes
1answer
2k views

using temporary files vs pipes advantages and disadvantages

Say I have a file named jobs.csv and I would like to get the top 50k jobs done by Foo I can either do: # cat jobs.csv | sort -u | head -n 50000 > /tmp/jobs.csv # cat /tmp/jobs.csv | while read ...
7
votes
1answer
3k views

nodejs server hanging from time to time

I have a node server (0.6.6) running an Express application, along with Mongoose and s3, on an Ubuntu 11.04 machine. Several times per hour, the server is hanging. That means that the application is ...
7
votes
2answers
24k views

In unix/linux, what is the proc directory for? why does it exists? [closed]

In unix/linux, what is the proc directory for? why does it exists? What can I use it for (if not just for the system)?