2
votes
0answers
65 views

Dual boot Solaris and Linux

I have a laptop running Oracle Solaris and Gentoo Linux. First I installed Gentoo Linux. I used GPT partitioning scheme. In order to boot Gentoo Linux I have GRUB 2. Then I installed Solaris 11.1. ...
1
vote
1answer
60 views

tcsh/vi-mode behavior difference between Solaris and Linux

We have both Solaris and Linux environments at work. We use tcsh as the standard shell for hundreds of users. My question is about vi-mode in tcsh: In Solaris, while I'm typing, I can backspace ...
3
votes
2answers
80 views

how to grep complex hierarcy?

I have a file as:- start apple 1 a 2 b 3 c start orange 4 a 5 b start mango 1 a start a/b/c 5 z end 4 b end 6 c end start banana 3 c end 4 d 5 e end I want the output as :- 1 apple/a 2 apple/b 3 ...
4
votes
2answers
181 views

What is the TTY major number of your Unix?

I'm currently working on a serial port library which already uses special frameworks to get information about serial ports on the system. Though serial ports are a fundamental design in Unix—as ...
0
votes
2answers
254 views

perl one liners + match word and delete string after separator

I work with linux/solaris machines and I need to add some rule in my ksh script: Please advise how to match the password word in file, and delete the value password after the separator "=" with perl ...
0
votes
1answer
60 views

Similar to solaries prstart -t command in linux

What is a similar command in Linux for the command from Solaris: prstat -t I am interested to get user vice resource consumption (i.e. memory and processor). It gives NPROC UserName SWAP RSS ...
0
votes
2answers
1k views

Memory usage on SunOS and Linux

I have some doubts with memory usage. Currently I have nagios check who measures used memory from free -m command on Linux. I added another script for memory usage from ...
0
votes
3answers
149 views

Shell attempts to interpret Perl script in spite of correct shebang [closed]

I have looked through the forums and I can't seem to find how to fix this. I have a very simple perl code that works fine on Windows, but when I try it on Linux and Solaris I get the following errors: ...
3
votes
1answer
176 views

SELinux context of files mounted from a Solaris server

Something I'm attempting to run in RHEL6 fails as a result of SELinux. The problem is temporarily easily solved with "setenforce 0". However turning SELinux off entirely isn't an option in my case. ...
7
votes
0answers
650 views

Solaris SMF vs Linux Upstart [closed]

I'm in the process of learning Upstart after first having learned SMF. Naturally I'm assuming that they fulfill the same purpose but I'm aware that this is where I'm wrong. Ideally I was hoping ...
4
votes
1answer
141 views

returncode of command in a pipline [duplicate]

The following script runs on Solaris using /bin/ksh and on Linux using /bin/sh cmd | tee -a cmd.log | tail exit $? The output of cmd is saved in a file cmd.log and the last lines are displayed on ...
2
votes
3answers
266 views

List all open '.log' files in *nix

There are times as a system administrator, you might not be sure of the log file paths of a new application. Depending on the system, there may be multiple ways to find the same. Please share the ...
12
votes
3answers
1k views

Wait command usage in Linux?

#!/bin/bash function back() { sleep $1 exit $2 } back $1 $2 & b=$! if `wait $!`;then echo success else echo failure fi bash-3.00# ./back 300 0 failure bash-3.00# ./back 300 1 ...
1
vote
1answer
1k views

Is there any way to check df -k hanging for nfs mount issues?

I am trying to write a script for such failure scenarios. In a scenario where maybe, if remote connection is lost, df waits for the remote server to respond (looks like df is hanging). I know I could ...
1
vote
2answers
256 views

perl one liner + how to match IP address that located in the first/sec field of file

the following perl one liner syntax verify if IP address in "$IP" match the IP ADDRESS in file perl -ne 'BEGIN{$IP=shift} print if /(^|\s)\Q$IP\E(\s|$)/;' $IP file file have two fields as the ...
2
votes
2answers
147 views

linux & solaris - separate netmask IP's from ordinary IP's

I have file with IP address and netmask IP's my target is to cut the netmask IP's from the file_with_IPs.txt and paste them to another file as file_with_only_netmask_ips.txt remark - netmask IP can ...
-3
votes
4answers
554 views

perl one liner + how to replace any last IP address octets

How to replace any last IP address octets (four octet ) to 0 remark: Implementation should be by Perl one linear on linux machines for example 192.9.200.124 will replaced to 192.9.200.0 ...
2
votes
1answer
51 views

Is there a PAM Standard?

Related to a StackOverflow question I have. Since it's more or less really a SO question through and through, I won't go into the whole spiel. My platform question is this: Is there an industry ...
2
votes
1answer
2k views

Configuring DNS resolver failover timeout

We have all of our systems set up to do internal DNS to a local name server and a secondary name server so that in the event the local DNS server is down they should go over the WAN to the secondary ...
1
vote
2answers
773 views

linux + match IP ADDRESS with 3 octets or with 4 octets

how to match IP address with 4 octets or with 3 octets in one command? target - match xxx.xxx.xxx or xxx.xxx.xxx.xxx ( syntax should fit for Linux and Solaris ) how to merge the following commands ...
8
votes
0answers
208 views

how to get exit status from the command before the last [duplicate]

I have solaris machine ( solaris 10 ) please Look on the following simple commands (haconf -makerw | grep -iq "Cluster already writable") # haconf -makerw VCS WARNING V-16-1-10364 Cluster ...
1
vote
1answer
84 views

Nexenta (Solaris), strange user membership from LDAP

Anybody help me, why do run id command in the Nexenta OS (Solaris+Ubuntu), i get different result? a_ay@nexenta:/etc$ id -G 513 512 1000 201 203 1010 1013 1019 1020 1036 1039 1040 1041 1045 1046 1047 ...
2
votes
1answer
215 views

perl + combine exec command with perl one liner line

I have the following short perl script rename.pl. How can I translate this script to one liner perl syntax? And how to combine the perl one liner in find command? rename.pl #!/usr/bin/perl $op = ...
2
votes
3answers
1k views

`solaris + xargs command for solaris

the command find /tmp -name 'core*' -type f -print0 | xargs -0 works fine on Linux, but xargs -0 option is not legal on Solaris what is the equivalent option ( xargs? ) for Solaris 10 second ...
2
votes
3answers
789 views

What's the best way to backup files via network on Linux and Solaris machines?

I wonder what the best way to backup files VIA network I have Solaris machines with Oracle 10i with VERITAS cluster, machines are connected to EMC storage /data/oracle directory is mounted on the ...
0
votes
2answers
153 views

file command + how to view all results from file command

I use the file command in order to verify if file (PATH) is text/ascii file or encrypted file Because file command have allot of results ( small example in example 1 ) I want to get the all ...
0
votes
4answers
409 views

targeted network speed over LAN

I have a Solaris 11 system which has several NFS exports which are accessed my other systems within my LAN. I use a Linux system as a client for testing. I wrote a quick script to test read speed and ...
0
votes
1answer
137 views

linux/solaris + manipulation of Standard Output

I run the following line on linux/solaris machine ( all output will write in to /tmp/Log from application.bin ) ./application.bin 1>>/tmp/Log We can see the content of the /tmp/Log file ...
1
vote
1answer
203 views

Linux + Solaris how to verify the last execute process from list of process

I need advice: How to verify which is the last scan_sys.sh process that run in my linux or solaris ? my target is to kill all scan_sys.sh process , except the latest scan_sys.sh ( the last execute ...
1
vote
1answer
216 views

solaris + fit egrep for solaris

On Linux machines I use this syntax, in order to match all VALID ip's. My question: what needs to change for egrep command in order to run the egrep on Solaris? According to egrep manual page "-o" ...
0
votes
2answers
379 views

Is a shell script is a programming Language [closed]

This is the first question in UNIX: I was started shell script from 2 days before. But I have a conflict: is a shell script a special programming language for a specific shell??
2
votes
1answer
271 views

Issues while untaring tarball with acl

I am getting an error “Unknown file type 'A', extracted as normal file” while un-taring a set of files which has acl permissions set. I had created the tar file in Solaris with tar -cpfv ...
5
votes
3answers
1k views

Is the Solaris libc based on the GNU libc?

On Solaris: basename.c #include <stdio.h> #include <libgen.h> int main(int argc, char* argv[]) { int len = strlen(argv[0]); char *bsname = basename(argv[0]); printf("%s\n", ...
0
votes
0answers
127 views

Comparing the efficiency of Network Stack of two different Operating Systems

I want to compare the efficiency of Network Stacks of two different operating systems(Linux and Solaris) by measuring the amount of resources(context switches, systemcalls etc) that are consumed in ...
1
vote
4answers
384 views

FreeBSD is not Unix. But its Unix-Like Unix. Where is then the main Unix to read the source code?

I want to really understand System V, the main origin of Unix (not Unix-like nor modified Unix to Linux). The main origin which is very confusing and not really with care its written somewhere. Is it ...
3
votes
2answers
1k views

How can I check which terminal definitions are available?

The bulk of the question is in title, but to elaborate a little: On most Linuxes I can find /usr/share/terminfo -type f. But on Solaris machine I have nearby - this directory doesn't even exist. I ...
4
votes
3answers
3k views

How I can know the IP address of other users logged at the same remote machine?

I can see the names of other users on the remote machine with the who command... I'd also like know the IP address of those users... I was trying with the commands /sbin/ifconfing and netstat but I ...
3
votes
1answer
219 views

Detecting multihomed machine

Is there a way to reliably detect whether or not a machine is multi-homed? I'd like to be able to write a script that will return a true or false regarding that information.
4
votes
2answers
387 views

How to list all running X applications?

I'd like to get a list of all of the apps (across all users) on my machine that are talking to the X server. What's the most reliable way to do that? Find the socket X runs on and lsof for connections ...
2
votes
3answers
1k views

How to shut down or reboot a machine? [on different OSes]

What parameters do the "shutdown" command [or other command?] NEED, TO BE SURE that the machine reboots or shuts down for SURE? e.x.: version for Linux: # cat /etc/SuSE-release SUSE Linux ...
6
votes
4answers
365 views

Is knowing Linux required to learn Unix

Is it required to know Linux to learn other Unix. I don't know Linux but I am planning to learn Sun Solaris.