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

28
votes
3answers
3k views

Why is Linux reporting “free” memory strangely?

This is a canonical question about how Unix operating systems report memory usage. Similar Questions: Server refuses to use swap partition Memory Usage in LINUX I have production ...
23
votes
24answers
39k views

Finding the Public IP address in a shell script

I can find my IP address using ifconfig or hostname -i command. But how do I find my Public IP? (I have a static public IP but I want to find it out using unix command)
174
votes
11answers
56k views

Can I nohup/screen an already-started process?

I'm doing some test-runs of long-running data migration scripts, over SSH. Let's say I start running a script around 4 PM; now, 6 PM rolls around, and I'm cursing myself for not doing this all in ...
29
votes
6answers
9k views

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 ...
15
votes
8answers
4k views

How many and which partitions should I create for a linux server?

Partitions are very important on Linux server because it give you a lot of flexibility, for example when upgrading to a bigger hard drive. But, how many partitions should I create when building a ...
12
votes
1answer
382 views

Can you help me with my software dependency issue?

This is a Canonical Question about Compile Dependencies and Package Management. I have a question regarding compiling ports/software or installing RPMs on my *nix server. When I try to do this ...
64
votes
7answers
89k views

How to forcibly close a socket in TIME_WAIT?

I run a particular program on linux which sometimes crashes. If you open it quickly after that, it listens on socket 49201 instead of 49200 as it did the first time. netstat reveals that 49200 is in ...
2
votes
8answers
765 views

How to run a cron job?

I have a sample perl script which i need to run using cron daily ,could any one let me know the exact syntax to use cron job. Thanks in advance.
28
votes
9answers
30k views

How to reduce memory usage on a Unix webserver

I'm currently using a Joyent Accelerator to host my webapps, and it's working fine, however I need to reduce costs so I'm downgrading my current plan and that imposes some new memory limits (256M rss, ...
73
votes
9answers
37k views

Environment variables of a running process on Unix?

This is to troubleshoot some problems related to environment variables .. On Windows, I could do this by using tool such as ProcessExplorer to select particular process and view values of each ...
21
votes
5answers
3k views

Turning off atime on a filesystem

I am setting up a mongoDB replica set and one of the first things I am suppose to do is turn off atime on the file system. After researching this a bit, I am not opposed to doing this, but I have to ...
11
votes
2answers
8k views

Better logging for cronjobs? Send cron output to syslog?

I am looking for a better way to log cronjobs. Most cronjobs tend to spam email or the console, get ignored, or create yet another logfile. In this case, I have a Nagios NSCA script which sends data ...
8
votes
2answers
6k views

Is it possible to limit a Linux process so that it can only run on a particular core on a particular machine?

Let's say I have a quad-core box and four identical processes, each with ten threads. Is it possible, in Linux, to say that Process A is only allowed to run on CPU 0, Process B is only allowed to run ...
38
votes
2answers
4k views

Why do I have to edit /etc/sudoers with visudo?

I've noticed that the sudoers file and cron config files act in a special way compared to other config files on Linux. They need to be edited with a special wrapper rather than any text editor. Why is ...
14
votes
1answer
12k views

SSL Certificate Location on UNIX/Linux

Is there any standard or convention for where SSL certificates and associated private keys should go on the UNIX/Linux filesystem? Thanks.
8
votes
3answers
2k views

Is SSH logging capabilities equivalent to su logging for private/public key authentication?

Here at work, we have a non-root shared login account on UNIX that is used to admin a particular application. The policy is to not allow direct logins to the shared account; you must login as yourself ...
5
votes
2answers
2k views

Why does chmod(1) on the group affect the ACL mask?

I am trying to understand this Unix behavior (which I happen to be testing on Ubuntu 11.10): $ touch foo $ setfacl -m u:nobody:rwx foo $ getfacl foo # file: foo # owner: michael # group: michael ...
4
votes
1answer
2k views

Mounting windows shares with Active Directory permissions

I've managed to get my Ubuntu (server 10.04 beta 2) box to accept logins from users with Active Directory credentials, now I'd like those users to access their permissible windows shares on a W2003 R2 ...
3
votes
3answers
5k views

What's the purpose of setgid directory?

I know how setgid works, but I don't know why it is designed, is there any example to illustrate what problems it solves?
5
votes
3answers
358 views

Is SPF enough to make sure emails get delivered to inbox?

So I just succesfully set up postfix + dovecot. is SPF enough to make sure emails get delivered to my website's users? I don't want my emails to end up in their spam box.
128
votes
3answers
47k views

What is the difference between double and single square brackets in bash?

I just wondered what exactly the difference between [[ $STRING != foo ]] and [ $STRING != foo ] is, apart from that the latter is posix-compliant, found in sh and the former is an extension ...
52
votes
1answer
27k views

How do I change my private key passphrase?

I have an existing public/private key pair, the private key is password protected, the encryption may be either RSA or DSA. These keys are the kind you generate with ssh-keygen and generally store ...
8
votes
8answers
9k views

Home-brew automatic tiered storage solutions with Linux? (Memory -> SSD -> HDD -> remote storage)

Related to this question about using an SSD for system and HDD for data, except I would like my system to do this automatically... Is it possible to have several layers of storage and push items ...
30
votes
8answers
24k views

What is a zombie process and how do I kill it?

Virtual Shotguns?
30
votes
4answers
28k views

How to convert line breaks in a text file between the Windows and Unix/Linux formats?

How do I convert line breaks in a text file between the Windows and Unix/Linux formats? I have a *nix environment, but that I need to import and export data with the Windows-style line breaks. I ...
18
votes
2answers
8k views

Unix socket vs TCP/IP host:port

Could someone please describe to me the pros and cons of using a Unix socket file vs a tcp/ip localhost:port when setting up services on a server (Ubuntu, FWIW)? In this particular instance it's for ...
15
votes
9answers
2k views

Is there a paging version of `watch`?

Under a UNIX shell, how can I get a similar effect to the watch command, but with paging so that I can scroll around in the output if it takes up more than one screen? In other words, I want a ...
7
votes
9answers
9k views

Easiest way to email file via command line in *nix?

What is the easiest - and preferably most portable - command I can use to email a single file as an attachment a *nix shell?
5
votes
5answers
3k views

What's the best way of setting up a cron job to check that a long-running process is still going and if not, start it?

As per the title: What's the best way of setting up a cron job to check that a long-running process is still going and if not, start it? If I start a long-running process in cron, is it going to ...
2
votes
1answer
4k views

Incremental Backups of SVN Repository daily ? (OS = UNIX)

the first part of question how i can make Incremental Backups of SVN Repository ? what is the command do this ....... and how i can do this automatically (OS + UNIX)
9
votes
6answers
22k views

How to disable everything in crontab -l?

I just want to pause everything. Don't execute anything listed on crontab -l.
5
votes
8answers
704 views

Identifying changed files on *nix webserver

Looking for some (*nix) software which will build an index of "interesting" files on a server and notify when certain of those files contents are modified, or new files appear. Similar to rkhunter et ...
1
vote
3answers
2k views

I am on Rackspace Cloud. What is Bandwidth Out and Bandwidth In?

Can someone give me very easy to understand examples? And how to calculate? Suppose someone views a page off of my web server. This page is 400kb. How much is the bandwidth in and out for me?
23
votes
7answers
22k views

Why can't you fsck a mounted partition?

It's well-known that you should never fsck a mounted partition. I can understand how this could easily lead to corruption if the filesystem is written to by fsck (e.g., the -a option is used), but why ...
7
votes
2answers
5k views

Create Unix Named Socket from the Command Line

Is there a command similar to mkfifo but for domain sockets?
6
votes
3answers
3k 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 . ...
5
votes
4answers
10k 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.
5
votes
3answers
177 views

How to stay up to date with the latest information about UNIX software patches and upgrades?

Until now I have always used the SecurityFocus mailing lists to keep myself informed about the possible need of upgrading my server packages. The main problems I have with using this method: Massive ...
4
votes
3answers
9k views

Apache executes HTML, but not PHP; PHP CLI works

I am running php 5.3.3 on rhel 6.2 with Apache 2.2.15 and am failing to get PHP code interpreted by Apache. There are no errors (in the system log, httpd/error_log, or php_errors.log) - I have ...
0
votes
1answer
449 views

Managing SSH keys for multiple users for multiple systems (ie github like ssh key ui)

So we are trying to lock down our systems to be accessed only by a few logical users (users on the Linux machines) but many physical users. That is all the developers can login as user dev with their ...
4
votes
5answers
2k views

Inventory or Audit Installed Linux Software

I am working on a project where we need to be able to tell and report periodically on what software is installed on our various Linux/Unix servers. I have looked at this, How to inventory what ...
4
votes
1answer
17k views

Apache: Configure “LogLevel debug” for certain modules only?

I want to debug some authentication & authorization issues on my webserver, particularly with mod_authnz_ldap and other mod_auth* modules. So I set LogLevel debug in the Apache configuration, ...
2
votes
2answers
3k views

Monitoring /proc/sys/fs/inode-nr

As part of a general overhaul of some Nagios scripts, I am adding parameters to the scripts so that the thresholds can be determined on a machine-by-machine basis. As an example, we are specifying ...
1
vote
2answers
3k views

Apache, virtual hosts, and default sender for sendmail

So here's my issue...I have two sites hosted on one machine using apache's virtual hosts. I want to send emails from the two different sites (domain.com and domain2.com) using the appropriate email ...
1
vote
1answer
2k views

Weblogic administration console way too slow

I've installed weblogic 10.3.3, configured simple domain with default configuration. And after starting weblogic I cannot use it via admin console because it is starting too slow (~10 mins). It seems ...
1
vote
2answers
163 views

How can you see the processes which you put to background?

This question is based on this thread. How can you see the processes which you put to background?
0
votes
1answer
202 views

command to edit /tcb/files/auth/s/someuser

is there a command in HP Unix used to change for example min age for password in this file without actually editing the file? /tcb/files/auth/s/someuser it has to do with trusted or non-trusted ...
0
votes
4answers
168 views

No longer have to enter a password to SSH into another server?

For some reason, I have a server that if ssh into another server...you don't need to enter the password. How is this done? Can someone give me step by step instructions please?
94
votes
15answers
99k views

Copying a large directory tree locally? cp or rsync?

I have to copy a large directory tree, about 1.8 TB. It's all local. Out of habit I'd use rsync, however I wonder if there's much point, and if I should rather use cp. I'm worried about permissions ...
36
votes
52answers
6k views

Favorite Unix command line aliases? [closed]

What are your favorite command line aliases (bash/sh/tcsh) aliases? Here are a few of mine. alias lsr='ls -lrt' alias gon='cd $HOME/Notes' alias devdb='mysql -h dev --user=x --password=secret ...