Questions tagged [unix]

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

Excerpt from the Wikipedia page

Unix was originally written in assembly but has since been rewritten in C. It has been branched many times both commercially and open source. One popular variant is the BSD variant which originated from the University of California, Berkeley. It also gave rise to Linux.

Notable variants

  • Silicon Graphics - Irix
  • IBM - AIX
  • Sun Microsystems - Solaris
  • Hewlett Packard - HP-UX

Unix is officially trademarked as UNIX.

Unix on Wikipedia

1949 questions
39
votes
52 answers

Favorite Unix command line aliases?

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 dbname' alias ec='rm *~'; # emacs cleanup alias…
anon
36
votes
4 answers

What are the advantages/disadvantages of hard versus soft mounts in UNIX?

This question may vary between distros but, in general, what are the advantages/disadvantages of using a hard or soft mount in the UNIX world? Are there certain situations where one is more beneficial or are the uses fairly universal?
Aaron K
  • 1,525
  • 5
  • 18
  • 16
36
votes
8 answers

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, 512M swap). I wasn't too far over them…
lima
  • 807
  • 1
  • 9
  • 14
35
votes
10 answers

Is it feasible to have home folder hosted with NFS?

I'm planning to deploy some kiosk computers and would like to leave them with a small pendrive as boot disk, keeping the rest at an easy to back up server, ala LTSP. Right now I'm pondering two options. An NFSed /home/, or a local copy of ~/ copied…
voyager
  • 708
  • 1
  • 6
  • 13
34
votes
30 answers

Command line safety tricks

Command line and scripting is dangerous. Make a little typo with rm -rf and you are in a world of hurt. Confuse prod with stage in the name of the database while running an import script and you are boned (if they are on the same server, which is…
deadprogrammer
  • 1,691
  • 7
  • 24
  • 25
33
votes
3 answers

Cannot mount an existing EBS on AWS

I tried mounting an existing EBS Storage (which has data) to an instance, but it keeps throwing this error. mount: wrong fs type, bad option, bad superblock on /dev/xvdf, missing codepage or helper program, or other error In some…
Sai
  • 333
  • 1
  • 3
  • 4
33
votes
5 answers

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 thought there would be a standard utility or command…
alexeit
  • 906
  • 2
  • 16
  • 19
33
votes
2 answers

Copy directory tree without empty directories?

I have the following tree # upper letters = directory # lower letters = files A |-- B |-- C |-- D |-- e <= file |-- F |-- G I need to copy this tree to another destination, recursively ignoring all the empty directories. So the…
Dane O'Connor
  • 1,269
  • 2
  • 15
  • 20
33
votes
4 answers

How i configure monit to start a process with a specific user?

Monit runs with root, but i don't want to start my processes as root.. like mysql, mongrel, apache..
Guilherme
  • 751
  • 2
  • 7
  • 8
33
votes
42 answers

Tools a Unix administrator cannot live without

After administering Unix or Unix-like servers, what tools (command-line preferably) do you feel you cannot live without?
John T
  • 1,059
  • 1
  • 15
  • 19
31
votes
2 answers

Linux/Debian - What does 'pee' in moreutils do?

I recently discovered the 'moreutils' package in Debian (and Ubuntu). It's a collection of convenient unix tools. One of the commands is 'pee'. The man page says: pee is like tee but for pipes. However it's a short man page, I have filed a bug…
Amandasaurus
  • 31,471
  • 65
  • 192
  • 253
31
votes
2 answers

When to use single quotes, double quotes, or no quotes in grep?

While trying to search for a simple pattern "hello" in a file, all the following forms of grep work: grep hello file1 grep 'hello' file1 grep "hello" file1 Is there a specific case where one of the above forms work but others do not. Does it make…
TheLameProgrammer
31
votes
7 answers

Can a program tell it is being run under sudo?

I have a program that should behave differently if it is being run under "sudo". Is there a way it can find out if it was run under sudo? Update: Someone asked why would I want to do this. In this case, on a Mac using MacPorts there is output that…
TomOnTime
  • 7,945
  • 6
  • 32
  • 52
31
votes
9 answers

Why is Linux more popular than BSD?

Some would argue that BSD/Unix has always been more reliable and stable than Linux (not me, of course, don't hurt me!). Why does Linux always seem to beat BSD? Is it the romance of the Linux story? I don't intend to offend anyone, please don't take…
Aaron Watters
31
votes
5 answers

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 ask, what uses atime? I have searched the…
QWade
  • 917
  • 1
  • 11
  • 17