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

11
votes
5answers
42k 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 ...
-3
votes
1answer
15 views

How to cut a string after a number of characters in unix? [on hold]

How to delete all characters in one line after point with with sed? I have a file with multiple lines like this: 123456789 3483 98765432 56345 985745634 3469 67495735 87654 Now I want to delete ...
6
votes
2answers
1k 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 ...
173
votes
5answers
65k 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 ...
1
vote
0answers
19 views

Monit “check program” and restart based on exit code

When I use check process, monit will start the program I define under start program then monit will restart it if it stops. But when I use check program monit will not automatically start it. If the ...
24
votes
3answers
25k 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.
0
votes
0answers
12 views

How to connect to mail server in C [migrated]

I tried to make a connection to my mail server which is in local area network. The ip of mail server is 192.168.1.1. So, I tried the following program to test that. Program: #include<stdio.h> ...
0
votes
2answers
46 views

Unix / Linux command to see finished or killed processes

Is there a way to see processed that finished running or were killed a given amount of time ago? For instance, ps -ef will show all running processes, but if a process finishes, it is no longer ...
2
votes
2answers
10k 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 ...
0
votes
2answers
1k views

Terminal output being cut off

I'm using ZSH as my shell and running a Debian 7 installation on a Linode box. When I ssh into this box and run any command where the output is larger than the window, the output that extends beyond ...
0
votes
0answers
10 views

Data was truncated on an input, output or update operation

Question: What can cause that in rare times (in a few %), 0 Byte sized files are created over FTP with the following errormessage: Data was truncated on an input, output or update operation ...
17
votes
9answers
24k views

How can I find the biggest directories in unix / Ubuntu?

Is there a way in Unix to see the biggest directories on disk ? I need to know why I'm almost done with the space on the server, and I dunno where most of the space is used.. thanks
0
votes
0answers
9 views

consistent uid in multiple Distributed File System nodes

I am using GlusterFS to build a Distributed File System, which later I use to store the instances files for my OpenStack cloud. Each node need to have r/w access to the files on Gluster. The user by ...
2
votes
1answer
4k views

502 Bad Gateway Error Nginx connect() to unix:/tmp/unicorn.sock failed

This is my first question on Server Fault. I could not find a solution to this while searching the web. I am working on an OpenBSD server running Nginx, which I did not setup, that is throwing a 502 ...
-1
votes
1answer
48 views

Deploying R on Work Server [closed]

We are looking to install R on our UNIX server at work, where we currently have SAS up and running. I know that R uses RAM to run, so are there any concerns with having R installed on an enterprise ...
5
votes
1answer
5k views

Is it possible to set a timeout on openssl's s_client command?

I've got a script which uses openssl's s_client command to pull certificates for a big set of hosts. Some of these hosts will inevitably be unreachable because of a firewall. Is it possible to set ...
3
votes
1answer
73 views

Passing Apache variable into SetHandler directive

I'm trying to have dynamically determined Unix socket used for different separated PHP "apps" (different sockets lead to different PHP-FPM pools) on my Apache (2.4.18) server (using mod_proxy_fcgi): ...
3
votes
2answers
10k views

how to run cron job every 3 months?

What would be the crontab entry look like for a job that runs on the first day of every third month?
0
votes
1answer
30 views

How to get the time and date at which a user account is locked/unlocked in unix?

I need to get the exact time and date at which a user account was locked or unlocked in Linux. passwd -S command can give the status of an account i.e., if its locked or unlocked.
0
votes
1answer
24 views

Simpliest unix non-blocking “broadcast” socket

I have non-regularly running program which outputs string, I need to send this output to some kind of socket which can be distributed out of docker container and which can be listened by multiple ...
5
votes
2answers
359 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, ...
0
votes
0answers
23 views

Bash - Deployment script for files to a webserver

I am using an old machine as a webserver to host a static, code-generated site (the site serves HTML documentation, JS, PDFs and images). The old machine, along with development PC are on a home ...
-1
votes
2answers
224 views

Is this have any affect on why my BIND9 is not working?

$/etc/init.d/bind9 restart Stopping domain name service...: bind9rndc: connect failed: 127.0.0.1#953: connection refused . Starting domain name service...: bind9. (By the way, this is a continuation ...
1
vote
8answers
181 views

What script or program is needed to keep a unix system date correct?

What script or program is needed to keep a unix system date correct? I find that my linux servers are behind a few minutes from actual time.
11
votes
8answers
14k views

Is it possible to hide lost+found?

Given a partition intended solely for storing music, video and so-on, is it possible to hide the lost+found directory?
123
votes
13answers
135k views

Copying a large directory tree locally? cp or rsync?

I have to copy a large directory tree, about 1.8 TB. It's all local. Out of habit I'd use rsync, however I wonder if there's much point, and if I should rather use cp. I'm worried about permissions ...
2
votes
1answer
1k views

List environment variables of a running process on AIX without character limit

Today I was trying to debug an issue where a process was not picking up the correct environmental variable. It took us hours before we realized that it wasn't picking up the correct variable. I tried ...
0
votes
1answer
18 views

Checksum error while installing ambari

While installing ambari server,getting following error. yum install ambari-server -y Loaded plugins: fastestmirror, security Loading mirror speeds from cached hostfile Updates-ambari-1.7.0 | 2.9 ...
4
votes
1answer
1k views

cp -p will preserve times for some files but not all?

I have a source directory on a machine with a bunch of files, all with the same permissions, that I want to copy to another directory, that is mounted via SMB. [tmark@dexter JR09141045 ...
104
votes
9answers
142k views

How do I get current Unix time in milliseconds using bash?

How do I get the current Unix time in milliseconds (i.e number of milliseconds since Unix epoch January 1 1970)?
1
vote
1answer
119 views

Wrong hardware time on linux

I don't have the correct hardware time on my debian server: root@server[09:48]:date Tue Dec 22 09:48:52 EST 2015 root@server[09:48]:date -u Tue Dec 22 14:48:54 UTC 2015 root@server[09:48]:cat ...
0
votes
0answers
47 views

HDP installation using ambari failing on CentOS 6.7

I am getting following error while installing HDP using ambari. Couldn't make out where the error lies,as error itself is not very clear. ========================== Creating target directory... ...
1
vote
3answers
368 views

Linux's /etc/init.d - symlink, hard link, or actual file?

I have a Debian and an RPM package that requires a start/stop script to be added to the /etc/init.d directory. Recently, I was informed by a remote developer that "those in the know" know that "best ...
1
vote
0answers
9 views

HP-Unix: C-shell:Disk space checking

I have 10 devices that using hp-ux and i want to check the disk space in each devices. my requirement is if the space more than 90%, the info of device ans space will be save to a log. this is list of ...
16
votes
6answers
50k views

How to change owner of mount point

We have moved mysql data directory to another disk, so now /var/lib/mysql is just a mount point to another partition. We set the owner of the /var/lib/mysql directory to mysql.mysql. But everytime we ...
0
votes
0answers
26 views

Super confused about possible NAT kerfuffle

I have a PFSense running on a ZBox at the moment - there are 4 Interfaces: LAN 1(192.168.2.0/24) WAN 1(192.168.2.0/24) (I know, same address, but this IF only connects to a modem, everything ...
42
votes
5answers
39k 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?
-2
votes
1answer
22 views

UNIX Shell Script IP Lookup

UNIX/LINUX: I'm not there yet with writing shell scripts. Trying to write a short shell script that asks user to input IP address and performs host lookup of IP address and returns a name if ...
-1
votes
2answers
46 views

LINUX/UNIX basic command questions

I'm trying to write a single command line that uses netstat and grep to count all connections in a state of “ESTABLISHED” and outputs a single number representing how many connections are currently ...
0
votes
4answers
51 views

How can I tell which static IP address one computer uses to connect to another computer?

I have a workstation connected to several internal networks, with a different static IP address on each of them. Through one (?) of these networks, I can connect to a server over ssh. How can I tell ...
4
votes
2answers
4k 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 & ...
1
vote
0answers
76 views

uWSGI TCP/IP host:port vs Unix socket

We are running a Python WSGI server (uWSGI) and changed to socket file instead of a tcp/ip localhost:port connection. Now our uwsgi logs are full of errors like IOError: write error SIGPIPE: writing ...
4
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 ...
0
votes
0answers
19 views

inconsistency between pfiles and fuser

$ uname -sri SunOS 5.10 i86pc $ fuser securityagent-default-server321-1449307160087-2015-12-05.log securityagent-default-server321-1449307160087-2015-12-05.log: 29478o $ pfiles 29478|grep ...
10
votes
5answers
357 views

How do I change to the directory I just moved that file to?

So lets assume I've just done: mv ./myfile /to/some/other/place/ And I now decide I want to follow the file, and go into that directory. Whilst I could head for the mouse, select the text, type ...
5
votes
2answers
3k views

Encoding to base32 from the shell

I'm looking to encode an input string to base32 encoding directly from the shell. I'm looking to do this in ubuntu, but I imagine flavor doesn't particularly matter here. Are there any existing ...
0
votes
1answer
67 views

Hostname changed without syslog restart

I wish to know is there any way I can changed hostname without restarting the syslog As I want the changed hostname to be reflected in the syslog messages. Thanks Arpit
3
votes
1answer
1k views

Sending content of a file in Expect

How Can I send the content of a file in Expect? Do I have to use cat command in a way? if yes how? lets say my file is called 1.txt. example: expect "Enter command to send:" {send "???? \r"} ???? ...
0
votes
1answer
537 views

Managing SSH keys for multiple users for multiple systems (ie github like ssh key ui)

So we are trying to lock down our systems to be accessed only by a few logical users (users on the Linux machines) but many physical users. That is all the developers can login as user dev with their ...
0
votes
2answers
39 views

list of size of directories of /dev/sda mounted as / without other partition or mounter

as you can see here: Filesystem Size Used Avail Use% Mounted on udev 10M 0 10M 0% /dev tmpfs ...