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
16
votes
7 answers

In *nix, how to determine which filesystem a particular file is on?

In a generic, modern unix environment (say, GNU/Linux, GNU/Solaris, or Mac OS X), is there a good way to determine which mountpoint and filesystem-type a particular absolute file path is on? I suppose I could execute the mount command and manually…
smokris
  • 705
  • 3
  • 13
  • 27
16
votes
5 answers

How do I 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 files. fuser -c did better work, but the list of…
ujjain
  • 3,983
  • 16
  • 53
  • 91
16
votes
4 answers

how many user accounts can a unix-like OS host?

Let's say I want to have a server with as many user accounts as possible. How many is the max? I want millions of user accounts. Is that crazy? I'd host dozens of load-balance mirrors of the box, and user data would be stored on a highly available…
Chris Hinkle
16
votes
6 answers

Building a Linux Network for Our Company - Where Do I Start?

This is going to be a somewhat loaded question. I am programming in a company that has been around since 1962. A lot of things, especially computer / network stuff, is very dated. Let me give a bit more background. The company already operates a…
Calvin Froedge
  • 538
  • 1
  • 6
  • 16
15
votes
1 answer

Potential hijacked SSH session & SSH best practices

I'm freaking out a little bit at the moment. I am SSHing into a remote server that I have recently commissioned. I'm doing this as root. I have installed fail2ban and had a massive amount of banned IPs in the log. The last time I logged in i…
MarMan29
  • 343
  • 3
  • 7
15
votes
9 answers

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 $ mkdir new_directory $ mv * ./new_directory However…
Amandasaurus
  • 31,471
  • 65
  • 192
  • 253
15
votes
3 answers

Is there a mechanism in Unix (or Linux) to stop an in-progress core dump?

Let's say a (very) large process is crashing and dumping core, and we know the cause from other information (possibly an assert message, maybe something else). Is there a way to stop the core dump from being completely generated, since it's a waste…
Mike G.
  • 401
  • 3
  • 14
15
votes
10 answers

Multiple *NIX Accounts with Identical UID

I am curious whether there is a standard expected behavior and whether it is considered bad practice when creating more than one account on Linux/Unix that have the same UID. I've done some testing on RHEL5 with this and it behaved as I expected,…
Tim
  • 1,879
  • 3
  • 18
  • 16
15
votes
6 answers

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 redirected to /dev/null, but it makes me think that…
Jakub Arnold
  • 1,744
  • 10
  • 26
  • 33
15
votes
2 answers

Hosting Folder in the home directory using nginx

I would like to add a condition in an adduser script to update nginx.conf for it to load ~/www as http://ipaddress/~user whenever I create a new user. And when a user is named www.domainname it will host that domain name in the ~/www folder. Is…
Joseph Le Brech
  • 267
  • 1
  • 2
  • 6
15
votes
5 answers

How do I list a file's data blocks on Linux?

As I understand it, each file on a Unix-like operating system has an inode number (which can be viewed with "ls -i"), and each inode is a list of disk blocks that contain the actual data of a file. Is there a Linux command which takes a filename as…
mike
  • 3,963
  • 11
  • 30
  • 27
15
votes
1 answer

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 directory as result. What command should I use to…
Vladimir
  • 153
  • 1
  • 1
  • 4
15
votes
3 answers

Getting rsync to move file from source to destination?

Is rsync is a good choice for my project ? I have to : - copy files from source to destination folder via SSH, - be sure all files are copied, - delete source files after copy. - if I have conflict name, I have to rename files. It looks like I…
user44782
  • 265
  • 1
  • 3
  • 5
15
votes
8 answers

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 Linux box ? Which size should I set for each…
paulgreg
  • 4,154
  • 6
  • 33
  • 32
14
votes
2 answers

unix sort treats '-' (dash) characters as invisible

a file with lines (aa ac a-b) unix sorts to (aa a-b ac) instead of the expected (a-b aa ac) it is as if sort is ignoring the '-' character. interestingly, a dash by itself is sorted correctly (a b c -) sorts to (- a b c). why? anyway to change…
ps