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

5
votes
3answers
127 views

Returning A List Of Quoted Files Paths Using Find

I would like to create a tarball that contains files from a directory that have a ctime of less than 30 days. Most tutorials I have found have basically recommended doing something like this: tar cvf ...
5
votes
3answers
166 views

Sort Active Processes in Unix

How can i sort active processes by total process time in unix?
5
votes
2answers
9k views

UNIX - How to give user rights over another user and so I don't need to sudo or type password?

I have 2 users in question • git user - used for gitosis - so it's a No password user and it can be accessed only through root... • user user - where my files reside so what I would like to do is ...
5
votes
10answers
17k views

Recursive move utility on Unix?

Sometimes I have two trees that used to have the same content, but have grown out of sync (because I moved disks around or whatever). A good example is a tree where I mirror upstream packages from ...
5
votes
10answers
1k views

How to migrate a web site from one server to another with minimal downtime?

I have a server hosting a web site and other services that needs to be reinstalled. I would like to relocate these services to another server temporarily, with as little downtime as possible. Both ...
5
votes
2answers
630 views

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, ...
5
votes
1answer
2k views

Does directory mtime always change when a new file is created inside?

Is it always true that when a new file is created in a directory - the directory's mtime changes?
5
votes
3answers
2k views

Unix/Linux simple log parser (since, until)

Has anyone ever used/created a simple unix/linux log parser that can parse logs like the following: timestamp log_message \n Order the messages, parse the timestamp, and return: All messages ...
5
votes
2answers
1k views

Right aligning text in GNU Screen caption or hardstatusline

I have this in my .screenrc caption always "%{= Kw} [%0c] %-Lw%{= KW}[%50>%n%f* %t]%{= Kw}%+Lw%=| %l | ${FULLHOST}" It normally displays something like this: [01:06] 0$ vim 1$ top 2-$ tail ...
5
votes
1answer
707 views

What's the point of using runit in combination with monit?

I see a lot of people using monit in combination with runit. Isn't that redundant? What is the point of using runit as well? Is it because it's more reliable when dealing with services (as it doesn't ...
5
votes
4answers
6k 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 ...
5
votes
3answers
344 views

Can I create and manipulate unix “screens” in a script?

I have a work environment on my Ubuntu laptop in which I want to use three different screens. Eg. in terminal, I usually write screen -S mywork run_server_1 then, ctrl-a c to create a second ...
5
votes
3answers
1k views

How to whois microsoft.com from command-line?

If you 'whois microsoft.com', you get a whole bunch of listings from pranksters who thought it would be funny to mess with the listings by putting 'microsoft.com' in their subdomains. The output ...
5
votes
3answers
173 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 ...
5
votes
1answer
716 views

Are ulimits inherited by the shell, by the user, or a combination?

When a process spawns a subshell, how is the ulimit inherited? Is it by user, by shell, or a combination? Specifically, this was found in the context of HP Server Automation jobs failing on some ...
5
votes
3answers
556 views

Does anyone know a simple way to monitor root process spawn

I want to exec a script when a new root process spawns. (on Linux) How can I simply do that ? Thanks
5
votes
1answer
258 views

Send interactive zoning commands to Brocade switch

I have a Brocade FC switch that I'd like to do some zoning on. I have a build file with too many lines to copy-paste into a normal interactive session, and I have ssh set up with pre-shared keys ...
5
votes
1answer
926 views

Acessing a mercurial repository on a shared host over SSH

I have a shared hosting account with SSH access. I have set up a virtual Python installation and have copies of the system folders in $HOME: ~/bin, ~/lib ... I have installed mercurial through ...
5
votes
2answers
335 views

Please explain the following o/p of “top” command

Please explain the following line from the "top" command in the bold :- Mem: 1026228k total, 449640k used, 576588k free, 44812k buffers Swap: 1052248k total, 2020k used, 1050228k ...
5
votes
1answer
487 views

Anacron and fcron, what are the differences?

Anacron is a computer program that performs periodic command scheduling which is traditionally done by cron, but without assuming that the system is running continuously. fcron is another ...
5
votes
1answer
153 views

Crazy idea: Identify if system is idle when it's a black box

I need to be able to tell if a series of servers have anyone active on them, and if not then to automatically shut them down (turn off the VM). It's not a trivial task, because I have 1000+ server ...
5
votes
5answers
2k views

iptables vs. hardware firewall

I was wondering if anyone could speak to the advantages of a hardware-based firewall vs using iptables directly on a web server. I'm evaluating the cost effectiveness of having a dedicated firewall ...
5
votes
1answer
4k views

How do I set 'max threads per process' ulimit for non-root user?

Ulimit man page suggests -r option will set this but it only appears to be valid for the root user and there is no equivalent for setting it via /etc/security/limits? Any ideas?
5
votes
3answers
265 views

What will prevent a reboot?

I've got a Mac fileserver that isn't acting right (and was acting strangely yesterday as well). I set up an audible ping to it, and sshed into it and, as root, issued the reboot command. It did ...
5
votes
2answers
232 views

Trying to delete a directory stored on a Windows server, from on a Mac, containing files created on the Mac, getting “Directory not empty”

I am trying to delete a directory stored on a Windows 2008 R2 server, mounted on a Mac as network home (10.8.5). The directory was created by Safari and stores temporary internet files. I need to be ...
5
votes
5answers
2k views

Groups and Permissions: Nested UNIX groups

We are getting more and more outside developers (from different clients) and are beginning to need a better strategy than adhoc adding to our server and adding to them ourcompany group (which owns ...
4
votes
8answers
4k 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?
4
votes
4answers
1k views

Bash script is not working as cron job

I have the following shell script $cat capture.sh TIME=$(date +"%H-%M-%d-%m-%y") IP="203.208.198.29" PREFIX=$TIME$IP tshark -f "udp" -i eth0 -w /root/captures/$PREFIX.cap& pid=$! sleep 2m ...
4
votes
4answers
2k views

Combine multiple unix commands into one output

I need to search our mail logs for a specific e-mail address. We keep a current file named maillog as well as a week's worth of .bz2 files in the same folder. Currently, I'm running the following ...
4
votes
2answers
3k views

Unix separate multiple commands which has '&' (execute in background) in the end

To separate regular commands in Unix is to put semicolon in the end like this: cd /path/to/file;./someExecutable; But it seems not working for commands like this: ./myProgram1 > /dev/null & ...
4
votes
9answers
372 views

Can my operating system be a VM?

This isn't a server question per se, but I wonder if I can have my operating system be, more or less, a VM. Right now, I have Windows XP, and run linux (most of the time) in VMware. I would just ...
4
votes
6answers
906 views

How do I scp to a user I don't have the password for?

Here is the situation. I have user access to a server and root access to the same server. I want to edit files for a user that I don't have password information for on the server. ssh'ing as root is ...
4
votes
5answers
1k views

Linux command equivalents in opensolaris (and vice versa)?

So we just recently moved to a host that is based on opensolaris rather than a variant of linux. I've found that there are a bunch of commands that don't operate the way I'm used to on linux ...
4
votes
5answers
656 views

Restore old SunOS tapes

I have some old SunOS tapes I need to look at the table of contents before I shred them. Is there a Linux solution to restore these tapes?
4
votes
8answers
1k views

Tools for Monitoring Multiple Unix Based Systems [closed]

What's your suggested tool to monitor multiple Unix (Linux and OSX specifically) based systems at the same time? I need to monitor the utilization of the CPU, memory, and disks in real time and would ...
4
votes
3answers
4k views

apt-get update/upgrade list without changing anything

I would like to view what packages are available for update/upgrade without actually changing any files becuase there are some packages I wouldn't like to update. Would it then be possible to apt-get ...
4
votes
5answers
3k views

How to translate error number to 'errno' constant?

Suppose I have an application running on a UNIX box that is failing with a system error status of '13'. Now, I can easily look up this value in errno.h, to find out that it is a permission-denied ...
4
votes
4answers
1k views

Faking the date for a specific shell session

I'm certainly trying to achieve something weird here, but I want to fake the date locally for a shell session on GNU/Linux. I need to black-box test how a program behaves at different dates, and ...
4
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
3answers
3k views

Why doesn't “ifconfig” work on some of my machines?

Some do...some don't work. ifconfig -bash: ifconfig: command not found
4
votes
5answers
3k views

Unable to remove file using 'rm'

In one of our severs (IBM AIX), we have a file in path /data/1002/ which we were not able to remove or delete using the 'rm' command. The error message we got is "rm: S1208001.002: A file or directory ...
4
votes
3answers
101 views

Putting server configurations in version control via SSH

I have a bunch of *nix servers in production. I would like to put it's important configuration files in version control The basic idea I had was to Put a distributted version control system so ...
4
votes
5answers
3k 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 ...
4
votes
5answers
41k views

How to FTP multiple folders to another server using mput in Unix?

I am logged in on a server (using Putty). from there I'm connecting using FTP to another server. I want to copy several folders from the first server to the second server using mput. Like: ftp> mput ...
4
votes
2answers
2k views

Why are files being removed from /tmp?

I use centOS5, but these files of /tmp is deleted automatically when time passes. What kind of structure will this kill him in? In addition, How to stop this?
4
votes
3answers
3k views

How to find all executable files? (AIX)

example -rwxr--r-- 1 me users 0 May 27 13:58 file_0 -rw-rwxrw- 1 me users 0 May 27 13:58 file_1 -rw-rw-rwx 1 me users 0 May 27 13:59 file_2 ...
4
votes
3answers
253 views

Java default JRE parameters on Unix

Is it possible to configure java in unix to always add a JRE parameter whenever java is run? e.g. -Dcom.sun.management.jmxremote.port=25800
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
5answers
2k views

Skip over intermediate server via SSH

I just got hired to work in a lab with a big 'ol linux cluster. I'm a mac/windows guy, so I'm still trying to figure out how to navigate around using a 'nix command line. So far I haven't run into any ...
4
votes
3answers
194 views

Store system passwords with easy and secure access

I'm having to handle several VPS/services and I always set passwords to be different and random. What kind of storage do you suggest to keep these passwords safe and let me access them easily? ...