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

0
votes
1answer
14 views

Usergroups in LDAP: User and Group in same object

"Usergroups" are a common concept in UNIX, many Linux distributions (e.g. Debian) use it as default. It means that each user has its corresponding private group (e.g., User "alex" has also a group ...
0
votes
1answer
22 views

Password reset is not working

I am using krb5 authentication to authenticate users in my machine. I am trying to change my password using passwd command but it failed. ~:$ passwd ~:$ Changing Password for bharathi ~:$ Kerberos 5 ...
7
votes
2answers
427 views

Sorting large binary files

Is there Unix utility for sorting large files containing fixed length binary records? In other words, I'm looking for something like sort(1) but for binary files with fixed length records. I could ...
7
votes
1answer
195 views

Linux/Unix - /etc/sudoers - host definition

can anybody tell me in which case the sudo host definition is useful? I mean this part of a line in the sudoers file: bob host1 = NOPASSWD: reboot In which environment (except sudo via LDAP) do I ...
0
votes
1answer
35 views

Configure IPv6 on FreeBSD webserver

Seems I just can't nail the right rc.conf configuration for IPv6 on my FreeBSD 10 VPS. I'd like to go completely IPv6 and tutorials/instructions i followed aren't really working for me somehow. It's ...
5
votes
1answer
41 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 ...
0
votes
0answers
26 views

Sending char* throug TCP Socket in C (Unix) [migrated]

i'm just learning how to handle socket and tcp connection in C. I've got an application (a long one) which basically sends and receive char arrays with the system call write from server to client and ...
0
votes
2answers
633 views

In Amazon EC2, how do I make it run a python script when I “clone” that instance?

Suppose I have a script in /home/myuser/go.py How do I run that script, when a new instance is booted? (I'm used to using the point-and-click control panel Amazon has...)
1
vote
2answers
29 views

Incoming tcp SYNs possibilities

This might be a general TCP question. Can I receive TCP SYN packet on an established connection OR a connection in TIME_WAIT state? Is is possible?
1
vote
1answer
29 views

Minicom Successive Address Dialing

I've been tasked with writing a script for the minicom connection utility that tests a series of numbers in its dialing directory, I have found the baked in scripting language to be near useless. I've ...
0
votes
2answers
6k views

How to determine when a user's account will be locked in HP-UX

I'm trying to figure out how to determine when user accounts on an HP-UX server will be locked. I would need this for every user on the server. On other kinds of UNIX, this kind of this is typically ...
1
vote
2answers
636 views

SCO UNIX problem: “Cannot create /var/adm/utmp or /var/adm/utmpx”

Hey everyone, I have an old server that doesn't boot. I don't know the version of unix installed, but I see SCO UNIX. It stops with that error: UX:init: ERROR: Cannot create /var/adm/utmp or ...
7
votes
4answers
12k views

How to disable everything in crontab -l?

I just want to pause everything. Don't execute anything listed on crontab -l.
0
votes
1answer
19 views

Using pppd with a serial port?

I just need to send/receive a messages through a unix-socket with PPP. But at first I want to launch the pppd with an usual serial port to make sure I know how it works. As I see, if I bind a pppd to ...
0
votes
2answers
17 views

updating, upgrading debian linux server except a package

I was looking for a command line to update/upgrade my VPS with the exception of the web server software. I have Nginx v.1.4.7 on my VPS and don't want it to get updated/upgraded when I run any ...
2
votes
3answers
190 views

Is there a utility to read environment variables from an env file and then run a command (more lightweight than foreman)?

foreman can read .env files and set environment variables from the contents, and then run a program e.g. foreman run -e vars.env myprogram ...but it does a lot of other things (and is primarily ...
0
votes
1answer
31 views

What should the permissions be on for PostgreSQL /data files?

I installed Postgres 9.3 from the osX binary. When I attempted to restart using pg_ctl restart, I received the following error: $ pg_ctl restart pg_ctl: could not open PID file ...
2
votes
1answer
47 views

How do you configure X11 forwarding over SSH on AIX?

Here is what I've tried. I've edited /etc/ssh/sshd_config on the remote AIX system X11Forwarding yes X11DisplayOffset 10 X11UseLocalhost yes as well as set $DISPLAY DISPLAY=localhost:10.0 export ...
3
votes
2answers
2k views

syslog ip ranges to specific files using `rsyslog`

I have many Cisco / JunOS routers and switches that send logs to my Debian server, which uses rsyslogd. How can I configure rsyslogd to send these router / switch logs to a specific file, based on ...
5
votes
7answers
7k 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 ...
2
votes
1answer
878 views

Linux- Permission denied?

I'm installing Neo4j server as a linux service, but when I install it, I get the following message: /sbin/insserv: Permission denied What is this? What should I do? I'm running everything with ...
1
vote
4answers
5k views

How do I install the latest version of Sphinx Seach in Apt-get?

When I do "sudo apt-get install sphinxsearch", I get version 0.9. I want the latest stable version (which is 2.4, I believe) How can I do that using aptitude?
9
votes
2answers
5k views

Better logging for cronjobs? Send cron output to syslog?

I am looking for a better way to log cronjobs. Most cronjobs tend to spam email or the console, get ignored, or create yet another logfile. In this case, I have a Nagios NSCA script which sends data ...
0
votes
1answer
638 views

Postfix connects to wrong relay?

I am trying to set up postfix on my ubuntu server in order to send emails via my isp's smtp server. I seem to have missed something because the mail.log tells me: Jan 19 11:23:11 mediaserver ...
0
votes
1answer
37 views

Nginx possible bug with dashes (-) in server_name

The following Nginx (v 1.2.1) configuration server { listen 80; server_name aaa.example.com; root /var/www/aaa; } server { listen 80; server_name hello-world.example.com; ...
7
votes
4answers
2k views

Specify default group and permissions for new files in a certain directory

I have a certain directory in which there is a project shared by multiple users. These users use SSH to gain access to this directory and modify/create files. This project should only be writeable to ...
3
votes
2answers
164 views

Why would chmod give “No such file or directory” when running recursively?

I can change the permissions of the file directly: # chmod --changes --recursive ug+rwX /var/www/shared/tmp/cache/assets/BA0/280/sprockets%2F286302903364106648b609d708884f78 and I can also ...
11
votes
1answer
7k views

rsync - Exclude files that are over a certain size?

I am doing a backup of my desktop to a remote machine. I'm basically doing rsync -a ~ example.com:backup/ However there are loads of large files, e.g. wikipedia dumps etc. Most of the files I care a ...
0
votes
0answers
18 views

*NIX devices getting Permission Denied errors after downloading ~4/5MB of data on FreeNAS CIFS share

I have my FreeNAS (FreeNAS-9.2.0-RELEASE-x64 (ab098f4)) which is set to rwx for my FreeNAS user and can be anonymously accessed through my network. When copying stuff from my windows host I get no ...
24
votes
6answers
7k views

Meaning of directories on Unix and Unix like systems

I've been using Linux for a couple of years now but I still haven't figured out what the origin or meaning of some the directory names are on Unix and Unix like systems. E.g. what does etc stand for ...
1
vote
1answer
26 views

Changing default ownership for files created by a user

I gave user "jdoe" access to SCP files onto a Unix server hosting Wordpress. Files this user creates within the /var/www/Wordpress folder (and subfolders) need to be owned by www-data or at least the ...
0
votes
3answers
382 views

“Silent” Backgrounding a Process

I have added a git pull & to my bashrc to keep a particular project always up to date! However this means every time I open a terminal I get a message like [17]+ Running git pull And a few ...
23
votes
7answers
38k views

How to get e-mail from (failed) cron-jobs in Ubuntu?

I create cron-jobs in Ubuntu by placing the executable in one of /etc/cron.{daily,hourly,monthly,weekly}. There are lots of directories starting with cron: kent@rat:~$ ls -ld /etc/cron* drwxr-xr-x 2 ...
4
votes
2answers
79 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, ...
1
vote
1answer
445 views

readlink: illegal option — f

Recently the script was working fine, but from some days I'm receiving such message, while running the readlink -f "$0" command: readlink: illegal option -- f usage: readlink [-n] [file ...] I was ...
1
vote
1answer
24 views

curl is giving wrong result via ssh

Curl is working fine on the node itself: [ec2-user@smokebase1 ~]$ curl -s -I --retry 3 --header 'Host: smoke-base.dev-test.com' ...
2
votes
2answers
62 views

how to configure firewall with “psad” utility to avoid port scan

I am trying to configure psad to stop port scanning and other attacks. Currently I have following rules set for my firewall which drops all incoming connection except port 22,80,443 and 3306. -A ...
0
votes
2answers
37 views

keep in tar.bz2 original directory datetime

I'm looking for a solution to create a tar.bz2 file and keep the original folder timestamp. My solution is "touch -t {original timestamp}" file.tar.bz2 manuel@mfpanzuela:~$ ls -la drwxrwxr-x 2 ...
18
votes
23answers
28k views

Finding the Public IP address in a shell script

I can find my IP address using ifconfig or hostname -i command. But how do I find my Public IP? (I have a static public IP but I want to find it out using unix command)
3
votes
2answers
313 views

How to tell the difference between “No such file or directory” and “Permission Denied”

I'd rather not parse STDERR, but I can't think of another way to tell the difference, programmatically, between the two: $ ls /net/foo.example.com/bar/test /net/foo.example.com/bar/test: Permission ...
2
votes
0answers
64 views

Solaris 9: Degraded mirror unmanageable with raidctl after drive replacement

We have a pair of Sunfire v20z's (WITH LSI MPT raid) that have each had one drive in their mirrors die. bash-2.05# cat /etc/release Solaris 9 4/04 s9x_u6wos_08a x86 ...
1
vote
0answers
22 views

Redhat quitting process never works always have to kill it

I am working on a RedHat server creating a unicorn process. I have two sets of these processes being created. I am able to QUIT one of the process fine and do so over and over again create it and QUIT ...
6
votes
4answers
2k views

Where should I place group shared files on a Linux system?

I'm migrating a lot of small custom scripts and data from a Linux system to another. On the old system we had a shared user that owned most of the files and they where located in that users /home, ...
0
votes
1answer
25 views

OSAS v4 Open Systems Accounting Software [closed]

My company recently purchased another company and along with it, came an old SCO Openserver (v5) running OSAS v4. We use TinyTerm as recommended to access this but no one knows how to use it. I've ...
1
vote
6answers
432 views

Is a Unix flavour (i.e. Solaris) any good for a VPS web server?

Lets just say I am a fanatic to using something such as this, and would be willing to purchase the appropriate licenses (or open version of Solaris maybe) and install it. My questions are, do ...
3
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 ...
0
votes
1answer
42 views

Unable to clear sendmail mqueue-client

drwxr-xr-x 2 smmsp smmsp 4.0K May 6 23:31 mqueue drwxrws--- 2 smmsp smmsp 29M May 8 10:40 mqueue-client As you can see mqueue-client is filled with 29 megabytes of unsent mail. This seems to ...
8
votes
2answers
3k views

Making libmagic/file detect .docx files

As seen elsewhere, docx, xlsx and pttx are ZIPs. When uploading them to my web application, file (via libmagic andpython-magic) detects them as being ZIP. I store the contents of the file as a blob ...
23
votes
3answers
2k views

Why is Linux reporting “free” memory strangely?

This is a canonical question about how Unix operating systems report memory usage. Similar Questions: Server refuses to use swap partition Memory Usage in LINUX I have production ...
2
votes
3answers
20k views

Most simple way of extracting substring in Unix shell?

What's the most simple way to extract substring on Unix shell (with regex)? Simple means: less feature less options less study Update I realized regex itself is conflicting with simplicity, and ...