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
17 views

Using PowerCLI Versus using asp.net WMI to scan and retrive informaion about ESX hosts

I want to scan and view information about ESX hosts which have "ESXi 5.0 Update 1" as their OS inside my asp.net web application. mainly to be able to retrieve the ESX specification and all the vms ...
91
votes
14answers
78k views

In my /etc/hosts/ file on Linux/OSX, how do I do a wildcard subdomain?

I need to test sub-domains on my localhost. How can I effectively have this result of adding *.localhost.com to my /etc/hosts/ file? If it's not possible, how do I work around this problem? I need ...
2
votes
1answer
35 views

logrotate compression parameters

I've been using cstream for a while for many things, for example to reduce the impact that mysqldump has on drives. However, I have always done so by calling the binary directly from a script or ...
3
votes
2answers
60 views

Postfix virtual domain mapping for a Linux username containing @

I could not make Postfix work with Linux usernames containing @ Postfix has virtual domain map, in /etc/postfix/virtual It looks something like this: domain.ru domain.ru ...
23
votes
6answers
44k views

How do I determine the block size of an ext3 partition on Linux?

How do I determine the block size of an ext3 partition on Linux?
1
vote
0answers
32 views

what is the the difference between all the NSS caching daemons?

I would like to see a comparison between nscd (part of glibc), unscd, nsscache, sssd and nss-pam-ldapd. Those are all the alternatives to nscd that i could find in Debian... Our setup is that we ...
3
votes
1answer
2k 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 ...
2
votes
1answer
7k 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 ...
27
votes
24answers
43k 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)
0
votes
0answers
25 views

red5 server installation could not resolve dependencies issue

I am trying to install Red5 server on my dedicated VPS server. My server is Ubuntu 12.04. I'm doing my installation over SSH in Terminal on Mac. I have Java 7 JDK and JRE installed. I am doing ...
-1
votes
0answers
22 views

Command Run Differently Depending on How Logged In? [migrated]

Is there a way to have one command run differently, depending on the manner in which one is logged into the session launching it? Basically, we have a command that when run, launches vim to display ...
5
votes
5answers
2k views

In UNIX, is it possible to password protect a directory?

Is there a way to password protect a directory in UNIX? Something like: ~$ cd dir ~$ Password: ~/dir$
1
vote
0answers
11 views

how to backup/sync and zipped ftp content to local drive (unix)

I know we can use the lftp command with "repeat mirror" flag but the files mirrored are not zipped so it will require huge local storage, what is the workaround/alternative? cheers
0
votes
3answers
69 views

how to find proces which is pinging localhost

How can you find the process issuing ping to localhost? While it is not script, where the ping command can be simply grep from process table. I have used wireshark, but it is of no help to find out ...
8
votes
4answers
6k views

How big (in bits) is a Unix UID?

I understand that unix user IDs (UIDs) are usually 16 or 32 bit unsigned integers but how can I find out for any given system (in a shell)?
1
vote
1answer
82 views

WHM - add another user account via SSH

I'm working for a crowd that have 'misplaced' the password for their WHM root login but I'm able to SSH to the server using the key file they've provided. I CAN'T change the password for root as they ...
4
votes
4answers
21k views

Move files to another directory which are older than a date

I am looking for a solution to move files that are year older from today. My log partition is getting full, but I can not remove them. They are needed for a long long time. Anyway one solution I came ...
2
votes
1answer
2k 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 ...
143
votes
4answers
53k views

What is the difference between double and single square brackets in bash?

I just wondered what exactly the difference between [[ $STRING != foo ]] and [ $STRING != foo ] is, apart from that the latter is posix-compliant, found in sh and the former is an extension ...
0
votes
0answers
6 views

Oracle external authentication from application server via sqlplus client

can we perform the external authentication (sqlplus / ) via sqlplus client from unix application server in oracle 10g or we must login to oracle database server to perform this ?
0
votes
0answers
17 views

Dangers of closing file descriptors

In the Stack Overflow question Check if a program exists from a bash script the accepted answer notes that closing stderr is dangerous: (minor side-note: some will suggest 2>&- is the same ...
4
votes
1answer
19k views

Apache: Configure “LogLevel debug” for certain modules only?

I want to debug some authentication & authorization issues on my webserver, particularly with mod_authnz_ldap and other mod_auth* modules. So I set LogLevel debug in the Apache configuration, ...
0
votes
1answer
193 views

path as variable

BACKUP_SERVER_NAME="name" BACKUP_SERVER_USERNAME="user" COPY_FILE_TO_WINDOWS="/cygdrive/c/unix_test_copy" scp -r /$1/ $PRIMARY_SERVER_USERNAME@$PRIMARY_SERVER_NAME:$COPY_FILE_TO_WINDOWS How can I ...
0
votes
0answers
11 views

current disk space status from multiple unix server [duplicate]

I am trying to get the details of disk space from around 100 unix server. All servers required different credential to access. This is the script I have found. for i in <server list> do echo ...
2
votes
1answer
40 views

How update passwords of user's already existing in ldap? [closed]

I want to update passwords [user's already existing in ldap] of the user by importing data from /etc/passwd and /etc/shadow. How to achieve this? I will give the overview of my setup. Nodes user ...
3
votes
1answer
64 views

Firewall: allow all traffic from sources authenticated via. an open ssh connection

I'm looking for a way to avoid the editing of the firewall rules all the time on test and dev servers. I don't want to open up all ports. So I thought maybe there is a way to allow all traffic from ...
2
votes
1answer
61 views

How to improve the efficiency of gnu parallel to read from a compressed stream?

Is another question extended from the previous one [1] I have a compressed file and stream them to feed into a python program, e.g. bzcat data.bz2 | parallel --no-notice -j16 --pipe python parse.py ...
0
votes
2answers
449 views

dsh (dancer's shell): is it possible to specify ports in config file?

Using dsh you can define the list of machines in ~/.dsh/machines.list in the form: <user>@<host> I'd like to have multiple hosts with different ssh ports, like this (I tried): ...
-1
votes
1answer
20 views

Can a Node.JS program write to disk if it is ran as a user without root privileges?

I am about to set up a VPS with a user that lacks root privileges. I also have a Node.JS server that writes files to the disk. If I run this program/server without root privileges, will it still be ...
1
vote
4answers
12k views

Getting full path of executables in ps auxwww output

Consider the following lines from a "ps auxwww" output: USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND root 4262 0.0 0,1 76592 1104 s005 Ss 10:02am ...
0
votes
0answers
19 views

How can I automate the retrieval and usage of passwords from within a script?

We have automated scripts that access certain devices and are getting the passwords for the devices from a root-read-only plain-text file. Is there some kind of architecture we can use so that we can ...
2
votes
2answers
846 views

pam_exec.so PAM module does not export variable PAM_USER as stated in the documentation

I'm trying to use the pam_exec.so PAM module to execute a script which needs to know the username/password coming from the application (OpenVPN in this case). I have a script that executes printenv ...
0
votes
1answer
140 views

Writing to Unix Domain Socket from rsyslog

I want to write output messages from rsyslog to a Unix Domain Socket. I want to do this so that I can read the messages from that socket using my script and parse log messages further. I try to use ...
2
votes
4answers
11k views

How to move directory from one server to other?

I have SSH access to the both servers, one of them is empty. How can I move site directory from old server to new server via SSH connection? PS: On both servers is unix
1
vote
1answer
18 views

How can I add an X-header to unix mailx?

I am attempting to add the x-header X-APP-VOLT: Yes to the header of my email with a .tar attachment. I only have access to usr/sbin/sendmail and mailx. I do not have root access so I can't download ...
8
votes
6answers
9k views

How to properly shutdown or reboot a Unix/Linux server

What is the correct way to turn off a Unix/Linux server? From my googling, I have learned (hopefully) the following: shutdown: I should use this, with the parameter -h to halt, or the parameter -r ...
6
votes
3answers
6k 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 ...
0
votes
1answer
37 views

Apache Web Server Virtual Hosting

i'm making a apache web server with two virtual host, i have a DNS Server caching-only on my other centos 6 minimal VM, the IP Address of my Apache Server is 192.168.1.9, when i try to browse that IP ...
2
votes
0answers
10 views

Should I rather explicitly run programs in foreground (instead as a daemon), or `expect fork` when configuring upstart daemons?

Many programs allow to be run either in daemon mode (which is usually the default), or explicitly run it in foreground with a flag such as -f. Now when configuring upstart to run programs like this, ...
34
votes
4answers
24k views

How to read backward from the end of file in less or more?

I've found one way so far: less +G filename, but it's scroll up only with up key line by line. What's more powerful less usages which provide scrolling by page, pattern search backward and so on?
4
votes
5answers
2k views

Appending output to a file at the same time truncating it to N lines

I'm trying to find a simple way to append/write to a log, while at the same time keeping it the log trimmed to a reasonable size. I would prefer to not just append files forever, and then have to have ...
3
votes
3answers
2k views

How do I disable command line history in Linux?

Right now, I'm aware that for all commands typed into the console, the Ubuntu system logs it somewhere. How can I disable logging of unix commands for all users?
18
votes
2answers
15k views

SSL Certificate Location on UNIX/Linux

Is there any standard or convention for where SSL certificates and associated private keys should go on the UNIX/Linux filesystem? Thanks.
4
votes
1answer
189 views

What is a solid process for designing a monitoring system?

The short version: I've got a heterogeneous environment of ~400 hosts using Groundwork/Nagios for monitoring. The current checks, hostgroups, and servicegroups have been put together in an organic, ...
39
votes
2answers
4k views

Why do I have to edit /etc/sudoers with visudo?

I've noticed that the sudoers file and cron config files act in a special way compared to other config files on Linux. They need to be edited with a special wrapper rather than any text editor. Why is ...
1
vote
1answer
40 views

unexpected end of file error in script file

#!/bin/sh # Host = ############### Port = #### email_id="##################" email_sub="######" # if ping -q -c 5 $Host >/dev/null then result_host="Successful" else result_host="Not ...
1
vote
1answer
48 views

Restoring AIX ufsdump on another Unix system

I've previously tried to restore from an AIX mksysb image (question here). I managed to find another set of nightly AIX backups that look to have been made with ufsdump: # mt -t /dev/rmt/1h rew # dd ...
7
votes
3answers
4k views

Is “sudo su -” considered a bad practice?

Background I know the difference between su -, sudo su -, and sudo <command>: su - - switches user to root, requires the root password sudo su - - switches user to root, requires only the ...
0
votes
0answers
52 views

Restore of AIX backup on other Unix system

I have two old AIX backup tapes box labelled "System Image" that I need to recover a few files from. I've tried to extract them using tar (Solaris and Gnu) and cpio with no success. I then ...
4
votes
1answer
70 views

Can't execute files in particular directories

We are encountering a bizarre issue were non-root users are unable to execute any files (scripts or binaries) in certain directories. This transcript demonstrates the issue: [root@b6 /]# mkdir q ...