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

6
votes
3answers
5k views

How can I rename an unix user?

I have a user named hedgehog and I want him to be named squirrel, but I don't want to change his numeric user ID. How can I accomplish this?
6
votes
2answers
954 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 ...
6
votes
6answers
15k views

How to check what port mysql is running on

On my windows dev box mysql is running on port 3306 How can I check what port it is running on the unix server that I have to upload the app to.
6
votes
8answers
2k views

Using inittab to ensure sshd (and other important items) are still running — any drawbacks?

Having managed to kill sshd on a remote machine (by running a script which used all available memory in the machine, oops...) which I have no access to other than visiting the hosting for[1], I was ...
6
votes
1answer
236 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 ...
6
votes
2answers
991 views

Start detached screen session

I would like to start screen detached session, but I want to evaluate some bash. It seems screen only supports an executable and binary. I want do do some magic like: screen -d -m script.sh ...
6
votes
8answers
5k views

what is the difference between linux and solaris OS?

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 ...
6
votes
4answers
3k views

TCP monitoring on a server: comparing netstat vs lsof?

I'm monitoring the TCP stack on a server hoping to generically infer problems with application on the box. My first inclination is to measure the number of sockets in all reported states ...
6
votes
3answers
2k views

UTF-8 and !# shell scripts

Is there a way to configure bash on Linux (red hat and ubuntu) to allow shell scripts to be encoded in UTF-8? I can't find a simple way to change just one little thing and have the whole system just ...
6
votes
2answers
4k 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 ...
6
votes
2answers
420 views

Freebsd Secondary Group not allowing folder deletion

TLDR: I have a user that is a member to a group as a secondary group. This user can delete files with 664 perms as a secondary user, but not directories with perms of 775. Details: I have a user. ...
6
votes
2answers
153 views

Chrooting a users login

I want to limit certain users on my system to a subset of commands and have absolutely no access to the rest of the system. I figure chrooting is the way to solve this but I only know how to chroot a ...
6
votes
2answers
120 views

Calling sync/fsync slows IO after 30 minutes uptime

After 30 minutes of uptime using Ubuntu 14.04 with an ext4 hybrid SSD I see many processes blocking IO using iotop. The root cause of this slowdown has been traced back to the Unix system call sync. ...
6
votes
2answers
1k 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 ...
6
votes
7answers
398 views

*nix measure memory usage

i'd like to measure the total memory (like RAM) used by a program during its execution. Ideally, something like time that runs the program and print stats when it exits. Is there such a standard tool ...
6
votes
2answers
2k views

Call to daemon in a /etc/init.d script is blocking, not running in background

I have a Perl script that I want to daemonize. Basically this perl script will read a directory every 30 seconds, read the files that it finds and then process the data. To keep it simple here ...
6
votes
4answers
1k views

Automatically-reconnecting TCP tunnel

I have an unreliable network connection between two machines: sometimes active TCP connections get dropped for reasons beyond my control. I want to establish a reliable TCP connection between the two ...
6
votes
1answer
1k 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 ...
6
votes
4answers
3k views

How to refresh an online website mirror created with `wget --mirror`?

One month ago, I used "wget --mirror" to create a mirror of our public website for temporary use during an upcoming scheduled maintenance window. Our primary website runs HTML, PHP & MySQL, but ...
5
votes
5answers
4k views

What are the benefits of the Logical Volume Manager

What are the features and potential benefits of Logical Volume Manager beyond what is detailed on its Wikipedia page?
5
votes
9answers
8k 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 $ ...
5
votes
5answers
22k views

How can I manually run a nagios check from the command line?

When defining and testing new services in nagios I have been restarting nagios, then clicking the service, and rescheduling a check for as soon as possible, then waiting until the check happens. Is ...
5
votes
8answers
674 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 ...
5
votes
2answers
405 views

what console command ./ means?

I saw many times console commands like ./redis-server or ./mongo what exactly ./ means?
5
votes
8answers
15k views

Is it possible to prevent SCP while still allowing SSH access?

Using Solaris and Linux servers and OpenSSH, is it possible to prevent users from copying files using "scp" while still allowing shell access with "ssh"? I realize that 'ssh $server "cat file" ' type ...
5
votes
5answers
260 views

How to find all filenames with given extension

I need to find all .pem files on my system. Would the following do this? sudo find / -type f -name *.pem If not, how would I write a find command to find every file of the sort?
5
votes
4answers
4k views

openwrt: Use rdate with NTP servers?

I've noticed that some embedded devices (such as OpenWRT, which runs on Busybox) use rdate to set the system time, instead of NTP. Rdate is an older time protocol, and I'm having trouble finding any ...
5
votes
6answers
366 views

Does Windows have symlinks?

I have been doing something on Unix that required a symlink. I want to port my application to Windows. Does Windows have symlinks? EDIT: I should be more specific. I'd prefer XP. I'll install Vista ...
5
votes
5answers
12k views

Where is the sudoers file on Solaris?

Where is the sudoers file in Solaris? Is it different between Solaris versions (specifically, 9 and 10)?
5
votes
4answers
7k views

Differences between /dev/sda and /dev/sda1

I know that /dev/sda is the raw device, and that /dev/sda1 is the partition or virtual device. But I'm a little confused as to why the sda# only comes up some of the time, or only on certain systems. ...
5
votes
7answers
8k views

Should I use a login banner and if so, what should it say?

Are interactive login banners worth having? The general consensus is that they are, but what should the banner say? Some things that are being considered (no particular order): ownership of the ...
5
votes
4answers
5k 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 ...
5
votes
3answers
1k views

What equivalent technologies to Microsoft's forthcoming ReFS exist for Linux/Unix?

With the announcement and write-up of ReFS (Resilient File System) on places like arstechnica, I am curious to know what technology, or technology stack, exists for Linux/Unix for a similar outcome. ...
5
votes
3answers
345 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.
5
votes
4answers
900 views

Log monitoring toolsets for Unix? [closed]

What are some good tools for monitoring logs on a system? I am currently using logsentry, which basically just runs grep on logs, ignores regexps I tell it to ignore, and mails me everything else, but ...
5
votes
4answers
11k views

How do you install ClearCase 7.1 on a Unix-based server with no GUI and no internet?

The challenges set by the ClearCase 7.1 installation process are multiple: The installation for Unix has been changed (no more './install_server' script): a unified GUI-based Java tool is used, both ...
5
votes
2answers
854 views

What is the purpose of each of the different UNIX/Linux shell startup files?

Previously, when setting up a *NIX environment for the first time, I would put all of my shell customisations into .bashrc, with the following .bash_profile: if [ -f $HOME/.bashrc ]; then . ...
5
votes
1answer
5k 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 ...
5
votes
4answers
9k 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
6answers
317 views

Web Designer Permissions on a Production Web Server [closed]

Just started working with a small group of front-end web developers who all login to the dedicated WHM/Apache production server with root to modify client web sites. They claim they do not want to ...
5
votes
3answers
796 views

long SSH password vs SSH Keys

Using amazon's EC2 Service, which is awesome in every regard. Only problem is, I have problems logging in with the SSH keys they automatically genarate. I have no idea what the problem is, but have ...
5
votes
2answers
11k views

execute su -c over ssh

I am trying to check the BIOS version of a server over SSH, a command that requires root privileges: ssh remote-server su -c dmidecode but this of course fails with the error: standard in must ...
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 ...
5
votes
6answers
1k views

(*nix) Cloud/cluster solutions for scalable web-services

I'm going to build a high-performance web service. It should use a database (or any other storage system), some processing language (either scripting or not), and a web-server daemon. The system ...
5
votes
3answers
126 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 ...