Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [unix]

Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs.

-1
votes
2answers
899 views

bash script to detect when a file is added to folder and command exec

I am trying to write a script to detect whenever a file is added to a specific folder and run a command using the last file added name. What I am specifically trying to do is to create a QR code for ...
6
votes
1answer
180 views

8mm Data8 tape drive compatibility for Maxell HS-8/112 and 3M D8-112

We have a Exabyte Mammoth-2 tape drive connected to a Solaris 10 box that's currently able to restore any Exabyte media no problem, but we have two other brands of 8mm tape that are shown as "illegal ...
2
votes
1answer
112 views

In bash script, what is difference between > and >| redirections?

What is the difference between the following two redirection commands? ls > out ls >| out They both seem to produce the same output.
2
votes
2answers
194 views

Connection refused on shared internet connection

The following picture shows the topology of my network. I now want to route all http traffic from 10.8.0.15 via 10.8.0.42 to the outside world, using wlan0. Unfortunately, I am a noob when it comes ...
0
votes
1answer
180 views

Use failover IP as a primary server IP

I bought a dedicated server which has its primary IP blacklisted, I am having a IP failover (NIC I believe) I'd like to use as a primary IP instead. Is action like that possible? if so, what can I do ...
-1
votes
1answer
258 views

How to get telnet working in SCO openserver release 3.2v5.0.6?

I have a sco box (SCO openserver release 3.2v5.0.6) and I went and changed the ip address of the server via netconfig. Sadly, telnet is no longer working when I attempt it from another computer to ...
1
vote
2answers
832 views

Parent bash script not receiving 'trap' despite process still running

What I'm actually trying to achieve: I'm trying to get a custom daemon working on a system that uses SysVinit. I have the bootstrapper /etc/init.d/xyz script already, which calls my daemon, but it ...
2
votes
1answer
48 views

Running OpenOffice as a Daemontools service not picking up the user

My problem is that, when started with Daemontools, files created by OpenOffice (which runs in server mode) are owned by root (and in the root group). When I start the Daemontools 'run' script manually,...
0
votes
1answer
87 views

Trouble running this simple cronjob on the server every 24 hours. What is wrong? [duplicate]

Trying to run an 'R' script at 00:30 every day. The script is located in /home/username/Desktop/folder/runnow.r and which Rscript reveals that the absolute path to binary Rscript is /usr/bin/Rscript. ...
0
votes
2answers
2k views

“yum repolist” showing repo list but there is NO repo file in /etc/yum.repo.d

Could any one look into the issue and help ? I have a Red Hat server which has Red Hat subscription and I tried to get all Security patches list using /usr/bin/yum list-security --security. After ...
0
votes
1answer
1k views

How to store SSH key without attempting to login with password using Plink?

The below command is used to attempt to store the SSH key, even though we tried to force exit in the command, still it is asking password. echo y | plink -ssh root@172.19.117.69 "exit". The server's ...
-2
votes
2answers
196 views

what happen when we delete resolv.conf file from a linux server

I have deleted the resolv.conf file from Linux server and now I am not able to login to the server. What is the logic behind this and How can this be resolved ??
0
votes
1answer
599 views

Default http proxy under FreeBSD

I'd like to set default http proxy for all users under my FreeBSD environment. I modified /etc/login.conf file by adding HTTP_PROXY variable: default:\ :passwd_format=sha512:\ :copyright=/etc/...
-1
votes
1answer
443 views

How does process CPU usage relate to Load Average? [duplicate]

I have the following host / load: Two 6-core CPUs, with HT (From what I understand, max load would be 24.0) 12 "primary" processes, with sustained usage of about 50% CPU Load average: 0.86 0.98 0....
-2
votes
2answers
7k views

How to find unix eth port link speed

I have small issue with my openwrt router. I want to know link-speed in format 10M,100M, 1000M, etc. or 10BaseT .. but I can't find it in /proc or with "ip" command also "dmesg" doesn't provide ...
7
votes
1answer
2k views

why linux reuse 'time_wait' port?

As I know, tcp port in 'time_wait' stat cann't be used. However, in my experiment, server reuses the 'time_wait' port? Why? Firstly, in client machine, type command ehco 40000 40001 > /proc/sys/...
1
vote
1answer
717 views

Timestamp comparison on AIX without date -d

I have a bash script on AIX 7 that runs a database query and the output I get is a timestamp in the following format: 201607130319. Now I would like to compare the timestamp with current time (date +%...
0
votes
2answers
2k views

How to filter (out) certain output in bash

I have a process that tails our AWS CloudWatch logs. It works great, except for the fact that every line is prepended by the CloudWatch group and container ID. For example: core-api ...
-5
votes
1answer
577 views

Run 64bit installer on 32bit centos cannot execute binary file [closed]

I Have a 64bit file from my old server, its ./install file now i want run it in 32bit server, see below error: [root@host ~]# ./installer.1 -bash: ./installer.1: cannot execute binary file My ...
-1
votes
1answer
1k views

What is the equivalent of chdir for UNIX?

I'm working on OSX 10.11.4 trying to write a simple bash script. I'm getting command not found when I try to use chdir. When I test with which chdir I get nothing. What's going on? I'm using this ...
-4
votes
1answer
39 views

web program today: why is online web program user =/= Unix user in /etc/passwd [closed]

History and explanation In the early days of Unix, ... as Unix was invented as a network and multi-user operating system; you could deploy web server programs on Unix where the online user in the ...
0
votes
1answer
717 views

Run FNDLOAD command on unix server from windows using Jsch

I'm trying to run an FNDLOAD command using Jsch after connecting to my unix server through ssh. But the command is giving me the following error bash: FNDLOAD: command not found Also if I try to ...
4
votes
1answer
92 views

How to let chef listen on multiple IPs

I'm currently playing with chef to evaluate whether or not such a configuration tool might help us in our *nix-based environment. For the last few days I'm struggling with one problem I can't find a ...
2
votes
0answers
183 views

ssh -t -t sudo displays back my password

My problem is about executing sudo over SSH. I have tried various things, but non works. Here is my script: ssh my-host /bin/bash << EOF # some commands... sudo -u my-user -s -- << EOFF ...
0
votes
1answer
2k views

Check number of connections to webserver port 80 AND 443

As the title says how would one check the number of open connections to a webserver on port 80 and 443? I'm currently using this oneliner to get the number of open connections per ipaddress from port ...
0
votes
0answers
54 views

wget FTP directories with more than 10k folders

I have an issue trying to move servers. I have a couple of folders with 300k subdirectories and wget will only copy the first 10000 (the same number that Filezilla is capable of showing). Splitting ...
1
vote
1answer
719 views

Why is my awk sub command failing?

When I run df -hl | grep '/dev/disk1' | awk '{sub(/%/, \"\");print $5}' I'm getting the following error: awk: syntax error at source line 1 context is {sub(/%/, >>> \ <<< "\"...
0
votes
1answer
116 views

Changing /etc/passwd in SSH User

I've got an Amazon EC2 instance running. It's an Ubuntu 14.04. I connect using Putty SSH. I use the key/certificates I got when I created the instance to authenticate my connection. This is all done ...
-2
votes
1answer
178 views

Removing 1 line of code from all php files

I can see same code under all php files. Starting from <?php $rfghoh = '*f%)sfxpmpusut)tpqssu6 And end $rfghoh=$yuoopi-1; ?> I am just looking for script using which only first line of ...
0
votes
2answers
646 views

SERVERFAIL error while doing nslookup on server itself. FreeBSD

I am using FreeBSD to setup a DNS server. I have install BIND and setup everything in resolv.conf and named.conf file. This is the ip address of my DNS server 192.168.10.100. in resolv.conf I added ...
4
votes
2answers
5k views

Create a file only if the directory exists?

I am trying to write the module where it creates the file if directory exists or else it shouldn't do anything. class puppetmodule{ exec { 'chk_dir_exists': command => 'test -d /usr/dir1', ...
-1
votes
1answer
49 views

BSD Connection 'Drops'

I've been setting up a BSD server and every thing went fine. It still works fine except on my own IP address I cannot connect to my webserver at all and with SSH I can login but then as soon as I type ...
1
vote
1answer
473 views

Apache James: eval: /opt/james/bin/./wrapper-linux-x86-32: not found

I'm setting up a James server for the first time. I'm using 3.0-beta4. After I copied the binaries to /opt, I tried running it: neonorb@neonorb /opt/james/bin % ./james start Starting Apache James ...
-1
votes
1answer
90 views

SSD Server with trim enabled

I have a Windows Server (but I think this problem may apply to any UNIX server too) running using SSD. I have Kingston UV300 SSD and they allow TRIM. I also checked and my Windows is running with TRIM ...
1
vote
1answer
2k views

Centos 6; phpMyAdmin 'Cannot log in to the MySQL server' after moving mysql.sock

I recently moved my mysql datadir from /var/lib/mysql to a new directory /home/mysql mounted on a new hard drive. For neatness sake I thought it'd be nice to place the tmpdir and socket on this new ...
1
vote
2answers
552 views

how to put files in ram

I have a server with 30 Gb ram and i have a script that put a (.ts) file (10mb) in /var/www/html/tv and script replace (.ts) file every 2 mintues. so my question is: can i mount this folder /var/...
0
votes
1answer
468 views

Installing a software in multiple linux machines using shell scripting in one machine

I will login to one Linux instance using ssh - putty and my goal is to install a software (for ex: I need to download oracle and install it) on 5 Linux machines with one shell script when I run that ...
-3
votes
1answer
28 views

A reminder/memo file at login in Unix Solaris

I want that a user gets a specific message on the screen when login in, which file should I update ? Thanks
1
vote
1answer
171 views

Unix move folders with pattern

How can I move subfolders with a pattern to the new location? Example list of sources: /data/aaa/_old/ /data/bbb/_old/ The destinations should be: /archive/aaa/_old/ /archive/bbb/_old/ Is there a ...
1
vote
1answer
6k views

ssh and git pull from remote server

I'm trying to ssh from server 1 to server 2 and do a git pull from server 1 to server 2. So on server 1, I run the following command: ssh root@server2 'cd /root/.example; git pull origin master' ...
2
votes
1answer
157 views

Why is this process refusing to quit?

I have a cron job that runs a shell script that executes a php script. It runs every day, sends some email, and writes to stdout (which is redirected to a log file in the shell script). It looks as ...
-2
votes
1answer
2k views

How can we get IO utilization for Process by Process ID using /proc directory? [closed]

I need to IO utilization for Process by Process ID without using any tool like iostat,iotop etc. Can any please help me to get IO utilization using info files using /proc/PID? Thanks in ADV.
4
votes
3answers
2k views

Non standard ssh port: should I edit /etc/services?

On a *nix system, when configuring ssh to listen on non standard port, should I also edit /etc/services to reflect that. I would think it should be done, so tools that use it (such as ufw) will ...
3
votes
1answer
501 views

Why does “cat /proc/net/dev” show only 0 for non-root users?

Recently, I've noticed that my script to monitor the network showed me nothing at all when it was run with a non root user. My script is simply looking at /proc/net/dev which has the following ...
2
votes
1answer
33 views

mv: when is the resulting file available?

Suppose one process does this: mv a large file to a destination directory And another process is watching for that file in the destination directory because it wants to read its contents as soon as ...
0
votes
1answer
53 views

How can I know why my dedicated server froze or crashed ? (Unix-like)

Recently, my dedicated server froze for around 50 minutes on Sunday. It did not respond to ping or any command. In the end, it was hard rebooted by the hosting company and everything works fine since ...
1
vote
1answer
44 views

Understanding top and tuning

I have allowed Postgres 30GB of RAM on our server. When running intensive tasks, I think it is swapping. As I understand it: VIRT - virtual memory (ie: swapped to disk) RES - complete memory usage ...
0
votes
2answers
253 views

Unable to clear up tmp

I had a bunch of files in /tmp that I cleared up by doing $ rm -rf ./tmp/*. However, I'm still unable to 'clear' that information, even after a reset. Here is what I have now: $ cd Av-bash: cannot ...
-2
votes
1answer
5k views

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

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 ...
2
votes
0answers
2k 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 ...