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
2answers
253 views

Why are Unix applications documented with an number in parenthesis with man?

When I try to get help on a Unix command, I get reference to say tar(1) or lsof(8). Why is there a number within parenthesis and what does it refer to exactly ?
6
votes
3answers
2k views

Non-recursive find on linux

I am trying to find all directories that are directly inside the current directory and older than a specific age. The trick is, I only want to consider the age of the immediate descendants of the ...
6
votes
6answers
605 views

Source vs Package Managers on the job

I am a bit confused, as there are two ways to install applications. One being to configure and make from source and the other from a package manager. If one were a UNIX/Linux administrator, is it ...
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 . ...
6
votes
5answers
3k views

How to include all files from a directory in shell script (/etc/init.d/iptables in this case)

I have an /etc/init.d/iptables start|stop|restart script on different ubuntu servers (which is a normal shell script) For each new service I have to edit and insert a line to open a port. This leads ...
6
votes
5answers
1k views

Is there still a reason why binding to port < 1024 is only authorized for root on Unix systems?

On Unix systems, binding to tcp port < 1024 from a process without root privileged is denied. What was the initial reason and is it still valid ? For example http server don't need root ...
6
votes
3answers
6k 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
5answers
4k 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 ...
6
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 ...
6
votes
2answers
1k 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
21k 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
1answer
6k 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 ...
6
votes
2answers
1k 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
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
242 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
8answers
7k 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
1k 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, ...
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
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 ...
6
votes
2answers
497 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
3answers
2k views

Preferred format of file names which include a timestamp

As we all know "unix" can have anything in a file except '/' and '\0', sysadmins however tend to have a much smaller preference, mainly due to nothing liking spaces as input ... and a bunch of things ...
6
votes
1answer
941 views

Can i call pushd/popd and prevent it printing the stack?

After calling pushd/popd in bash, it will print off the current directory stack. Is there any way to prevent this behaviour, so that it will act 'quitely'? This sort of noise in a command is uncommon ...
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
180 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
2k 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
406 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
2k 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
2k 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
9answers
9k 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
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
5answers
27k 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
17k 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
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 ...
5
votes
2answers
412 views

what console command ./ means?

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

Scripting alternatives to Bash shell scripts

I have just migrated to a UNIX workstation. My memory of Bash shell scripts has faded since school and I find the syntax to be highly confusing. I am wondering what other scripting languages are ...
5
votes
5answers
279 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
367 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
3answers
5k 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 ...
5
votes
2answers
2k views

How to create union of two directories?

In case of unix/linux, is there a way to create union of two directories without copying or linking manually everything to a single directory?
5
votes
4answers
6k 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
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 ...
5
votes
7answers
10k 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
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
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.