The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [solaris]

Solaris is a Unix operating system originally developed by Sun Microsystems (currently owned by Oracle) as a rebranding of SunOS 4.1.x in 1991.

Filter by
Sorted by
Tagged with
57
votes
5answers
171k views

How can I get a full process list in solaris, without truncated lines?

Is there a way to generate a full process listing in solaris, without truncated lines? I've tried the ps command, with the following arguments: -f Generates a full listing. (...
42
votes
4answers
7k views

Solaris let me in with different password with the same 8 first characters

I don't know if this is normal, but the thing is, let's say I have a Solaris user called gloaiza and its password is password2getin I'm logging into the server with PuTTY, I just put 192.168.224.100 ...
28
votes
5answers
148k views

How to check whether firewall opened for a port but not listening on the port

We will be deploying a new application to a Server and the application will be listening on port 8443. We have asked Network team to open the firewall for the port 8443 on that server before deploying ...
25
votes
4answers
20k views

Executing user defined function in a find -exec call

I'm on Solaris 10 and I have tested the following with ksh (88), bash (3.00) and zsh (4.2.1). The following code doesn't yield any result: function foo { echo "Hello World" } find somedir -exec ...
23
votes
6answers
36k views

How can I check what version of the VI editor I have?

How can I check what version of the vi editor I have? What's the best way to upgrade it or install vim on Solaris?
22
votes
11answers
19k views

Tool in UNIX to subtract dates

Is there any tool in Solaris UNIX (so no GNU tool available) to subtract dates? I know that in Linux we have gawk that can subtract one date from another. But in Solaris the maximum we have is nawk (...
22
votes
3answers
100k views

Searching for a string on multiple zip files

I am working on SunOS 5.10. I have a folder that contains about 200 zip files. Each zip file contains only one text file in it. I would like to search for a specific string in all the text files in ...
20
votes
6answers
50k views

Recursive search doesn't work for grep on solaris

On our Solaris server I'm finding that grep -r doesn't work, which is the usual way that I use grep. It seems that egrep has the same behavior. Given that I have no control over the machine, is there ...
20
votes
5answers
27k views

How to get file to a host when all you have is a serial console?

When all you have is a serial console (say via telnet through a terminal server), what methods can be used to transfer files in/out of a host? Cut/paste works for the small/printable stuff and I've ...
18
votes
8answers
128k views

How to get the hostname along with the domain name?

In unix (Solaris) is there any command that returns the hostname and domain name together? For instance: hostname -> servername domainname -> us.xyz.com I need : servername.us.xyz.com
16
votes
3answers
39k 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 ...
16
votes
4answers
14k 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 ...
15
votes
4answers
3k views

What is SSH - the protocol and what is ssh - the utility?

What is SSH - the protocol? What is ssh - the unix utility and how does it work? How is SSH protocol related to SFTP? What is sshd? Does the command su use ssh or sshd?
13
votes
3answers
7k views

Is it possible to redefine the tilde ('~', home directory)?

Is it possible to redefine the home directory? e.g. to /ext1/username instead of /home/username, i.e. expanding the ~ to another directory (as opposed to changing the actual home directory where users'...
13
votes
3answers
2k views

unix - accidentally moved everything under root to /old - Solaris 10

As the headline says everything or almost everything important as root under root (/) was moved to /old on a Solaris 10 machine. So now the typical fault when trying when running commands are Cannot ...
13
votes
1answer
1k views

POSIX Awk on Solaris 11?

This is more or less a follow up question to the following two: Syntax error removing duplicate lines via awk '!x[$0]++' file awk/nawk alternative on SunOs and Linux I see that on Solaris 10 ...
12
votes
3answers
7k views

Creating a UNIX account which only executes one command

Is there a way to create a user account in Solaris which allows the users to run one command only? No login shell or anything else. I could possibly do it with /usr/bin/false in /etc/passwd and just ...
11
votes
8answers
2k views

Display blank lines by cat command

I have a list of files.txt, below: -rw-rw-r-- 1 root dev 11 May 16 12:18 20_SumActive.txt -rw-rw-r-- 1 root dev 11 May 16 12:18 22_SumActive.txt -rw-rw-r-- 1 root dev 7 May 16 12:18 24_SumActive....
11
votes
2answers
13k views

Using grep -v on multiple arguments

Is there a simpler way to do this? grep -v foo file | grep -v bar There're probably very elegant ways to do it with egrep, but how to go with plain old grep? EDIT: grep -v 'foo\|bar' file seems to ...
11
votes
5answers
13k views

Is there any alternative to the “sed -i” command in Solaris?

I have a requirement in my project to replace some existing text in a file like foo with some other text like fooofoo: abc.txt name foo foo1 So I tried: sed -i "s/foo/fooofoo/g" abc.txt However I ...
11
votes
3answers
1k views

How do I less a filename rather than an inode number?

I have a piece of software that rotates its log files when it restarts. However, during development, I am restarting it a lot, so I would like to monitor the latest log file at any time. If I start ...
10
votes
2answers
1k views

Are there any alternatives to the `find` command on linux for SunOS?

The find command on Linux has a lot of options compared to the find command on SunOS or Solaris. I want to use the find command like this: find data/ -type f -name "temp*" -printf "%TY-%Tm-%Td %f\n"...
10
votes
3answers
21k 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 ...
10
votes
4answers
610 views

The future of OpenSolaris

since OpenSolaris is more or less abandoned by Oracle, is there a nice alternative that implements the unique features of OSOL? ZFS is one thing, but I liked the image creation system, that let you ...
10
votes
1answer
15k views

Solaris equivalent for depth/prune?

I am trying to find some files inside a directory. By default, the find command is searching the directory which I have specified and it's sub directories. I tried to use depth/maxdepth and prune, ...
10
votes
1answer
326 views

What are you going to do with your OpenSolaris machines?

I have a file server running OpenSolaris (mainly for ZFS, which I really love), but since Oracle has abandoned it, I'm starting to think about what I'm going to do with the OS on that machine. ...
9
votes
2answers
7k views

Remove prefixes from filenames

I have a bunch of files as follows: 04602635_b0294.DAT20120807164534 04602637_b0297.DAT20120807164713 04602638_b0296.DAT20120807164637 04602639_b0299.DAT20120807164819 04602640_b0298....
9
votes
7answers
42k views

How to run commands in batch mode over ssh?

How can I run commands in batch mode over ssh? That is, what is the ssh command's equivalent of sftp -b <filename> <hostname>? I have a set of commands which I wish to run across a set of ...
9
votes
0answers
2k 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 ...
8
votes
3answers
2k views

How to print a line if that line or the next line do not contain a particular string

Input.txt: 8B0C remove 8B0D remove 8B0E remove 8B0F 8B10 remove 8B14 remove 8B15 remove 8B16 remove 8B17 remove 8AC0 8AC1 ...
8
votes
3answers
15k views

Delete a range of email messages using the 'mail' command

I have about 1k+ mails in an inbox (old cronjob stdout). How do I delete them in bulk? I'm on Solaris 8 and I have only mail available, no pine or mutt or similar "UI"-based client. Inline help ...
8
votes
1answer
2k views

Using SSH to connect to a new server without storing the host keys in the $HOME/.ssh/known_host file

I get the following output if I run the following command: -bash-3.2$ ssh -o "StrictHostKeyChecking no" 192.168.1.77 Warning: Permanently added '192.168.1.77' (RSA) to the list of known hosts. Last ...
8
votes
3answers
4k views

Where is GCC-5 after installing it on Solaris 11?

Please forgive my ignorance... I only use Solaris for testing C/C++ libraries I have an interest in. I'm not a Solaris admin or Solaris user. I installed GCC-5 on Solaris 11.3, x86 because I needed a ...
8
votes
3answers
14k views

How to insert multiple blank lines after every line

I want to insert 5 blank lines after every line in my input file. foo.txt: line 1 line 2 line 3 out.txt: line 1 line 2 line 3 ... Solaris 5.10, nawk or sed.
8
votes
2answers
31k views

How to find HDs associated with a mount point

I am running on Sun Solaris system. I would like to know the following How to find the HDs associated with a mountpoint? How to find all available HDs (those which are used as well as unused for the ...
8
votes
1answer
501 views

How can Solaris sub-partitions be accessed in FreeBSD?

First of all, Linux detects the partitions: sdg1: <solaris: [s0] sdg5 [s1] sdg6 [s2] sdg7 [s8] sdg8 > However, FreeBSD 9.0 shows only the main partition. Is it possible that only Solaris ...
8
votes
0answers
251 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 ...
7
votes
3answers
6k 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", ...
7
votes
6answers
5k views

Can not find link to download OpenSolaris source code

I want to understand how OpenSolaris ptools(process tools) works. How exactly pstack, pmap, pargs etc works, but I can't find any link to its full source code. I can only find an online version of ...
7
votes
5answers
53k views

What is a good X application I can use to test the X server on Solaris?

I am using Solaris, and I want to test if the I can use the X server after setting the DISPLAY environment variable. On Linux, I usually use xeyes, xclock or xterm. But none of these seem to ...
7
votes
5answers
17k views

Difference between “/export/home” and “/home”

In our UNIX machine my home path looks like /home/<userid> and we have another batch user whose home looks like /export/home/<userid> I want to know what's the difference between /export/...
7
votes
5answers
50k views

Name resolution doesn't work, but nslookup does

I am having a very strange problem with my installation of Solaris 11. DNS resolution just won't work, but strangely enough, nslookup does and connectivity is fine: root@solarisxyz:~# ping ...
7
votes
4answers
35k views

What's the meaning of NP and UP in the password field of the shadow file

I found some entries in a shadow file whose meaning I don't understand. user:UP::::::: user1:NP::::::: What does UP and NP mean? In addition to those 2, the same shadow file has the normal hashed ...
7
votes
3answers
15k views

How to extract archive via network

I have two Solaris servers. On server1 I have a file, archive.tar.gz. I need to extract it using ssh to server2. So, I write the commands: ssh server2 < archive.tar.gz | gunzip -c | tar -xf - -C /...
7
votes
3answers
10k views

Can I change the output format of the “last” command to display the year?

I'm trying to find a way to report on the most recent login for all users on my Solaris 10 server. I'm starting with the output of the last command. Using that command, I get output like this: ...
7
votes
3answers
26k views

Why `host` and `nslookup` on Solaris 10 resolves hostnames while `ping` and `telnet` does not?

/etc/resolv.conf contains a nameserver that is alive (as reported by the ping command) host or nslookup is able to resolve google.com $ host google.com google.com has address 74.125.228.3 google.com ...
7
votes
1answer
1k views

“The entry is a door” in Solaris “ls” man page

I found this in a man page for ls in solaris linux. http://www.unix.com/man-page/opensolaris/1/ls/ What does it mean when it says: D the entry is a door?
7
votes
4answers
11k views

Solaris default install (user tools)

Many questions on this forum as well as other places really boils down to somebody coming from Linux environment and then not being able to use the equivalent command on Solaris. Often this is because ...
7
votes
1answer
9k views

Switch VI to use backspace key instead of Control+H for backspace?

I'm on Solaris 10 and by default vi version SVR4.0, Solaris 2.5.0 is installed. The system was set up so that when I ssh to it Control+H does backspace, and backspace outputs ^? I added stty erase '^...
7
votes
1answer
527 views

Wget cannot validate https://ftp.gnu.org?

I'm working on Solaris and trying to upgrade Git by building Git and all of its dependencies from sources. Wget is failing to download a dependency, which is located at https://ftp.gnu.org/gnu/...