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.

learn more… | top users | synonyms (1)

28
votes
4answers
48k 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. ...
16
votes
9answers
8k 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 ...
13
votes
4answers
795 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?
12
votes
3answers
788 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 ...
10
votes
4answers
482 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 ...
9
votes
4answers
2k 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 ...
9
votes
1answer
281 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. ...
8
votes
4answers
4k 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 ...
8
votes
2answers
2k 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 ...
8
votes
0answers
206 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
2answers
537 views

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

Is it possible to redefine the home directory? e.g. to /ext1/acheong instead of /home/acheong, i.e. expanding the ~ to another directory (as opposed to changing the actual home directory where users' ...
7
votes
4answers
8k 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 ...
7
votes
1answer
1k views

When does UNIX “defrag”? (specifically Solaris)

On Windows, there is Disk Defragmentor that runs every so often to make files contiguous again. I explain this to users in lay-men terms, but at the same time, I would like to mention yet another +1 ...
7
votes
6answers
9k 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 ...
7
votes
1answer
5k 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, ...
7
votes
2answers
1k views

Using sed to color the output from a command on solaris

I have a ksh script that must work on both linux and solaris. I'm trying to color the output of specific commands. It works on linux (specifically RHEL6), but not on solaris (SunOS 5.10). Command ...
7
votes
1answer
5k 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
0answers
434 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 ...
7
votes
0answers
284 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 ...
7
votes
2answers
2k views

Starting a service during startup

I've created a service for an application, and I want this application to be started on boot. In the service manifest, I realize that there's a property for this (enabled="true"), but I've been ...
6
votes
4answers
354 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.
6
votes
4answers
207 views

Quantify unix responsiveness

I am one of the n users of a shared unix machine. For reasons unknown, the machine is not "responsive" enough. For example, it is slow on interactive commands, it takes few noticeable moments for any ...
6
votes
5answers
9k views

How can i view the contents of a tar.gz file (filenames + filesize)

I cannot use tar -tz as the solaris version I'm using does not accept the -z option. I tried something like gunzip file.tar.gz | tar -tv but that only gives: tar: /dev/rmt/0: No such file or ...
6
votes
3answers
811 views

Equivalent of date --reference in Solaris

The GNU implementation of the date command has a nice feature to show the date of the last modification of a reference file, and using the +FORMAT parameter it is easy to get the date in any format, ...
6
votes
2answers
2k views

How do I change file associations from the command line?

The system in question is Solaris, using the Gnome type interface (Java Desktop Environment). We have occasional issues with users managing to mess up their file assocations (most notably .tif). ...
6
votes
1answer
405 views

Files bigger than max(off64_t) on Solaris, eg “/proc/../as”

How do I read or seek from a file that's bigger than the maximum off64_t? The problem arises because the address space of a process is represented in the /proc/.../as file, which is a huge sparse file ...
5
votes
2answers
177 views

Is Oracle Solaris UNIX?

Is Oracle Solaris officially declared UNIX? I want to know all the official UNIX presently available in the market (whether free or paid). Please correct me if I am wrong: To the best of my ...
5
votes
5answers
16k 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 ...
5
votes
2answers
1k views

Arg list too long error while using find

I have the find command as follows: find /jobs/logs/* -prune -name '*.log' -type f -mtime +1 | while read LOGFILE do echo $LOGFILE done This is failing due to the following ...
5
votes
4answers
2k 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 whats the difference between ...
5
votes
1answer
277 views

What is causing this Copy command to enter sleep state?

I am trying to recursively copy a huge directory of installables over 25G and want to preserve the owner and group id, permission modes and so on. So I ran the below commands: bash-3.2$ date; cp ...
5
votes
2answers
1k views

bourne shell if [ -e $directory/file.$suffix ]

I've been looking inclusive I even checked the if manual for bash and tried in cli mode. #!/bin/sh CONFIG_DIR="/var/opt/SUNWldm/" read option if [ $option -eq 9 ]; then ret=1 elif [ -e ...
5
votes
1answer
639 views

Solaris 11 login banner

How do you add a (GUI) login banner in Solaris 11? I've done quite a bit of searching and have found many things on SSH and FTP banners/motd for remote logins, but not much for the local GUI login. I ...
4
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", ...
4
votes
2answers
942 views

bash myscript.sh runs in bash, but the first line is #!/usr/bin/sh

I have a script similar following one: #!/usr/bin/sh var="ABC" if [ $var == "ABC" ] then echo True else echo False fi Above code does not work in Solaris Sparc and Solaris X64. It is showing ...
4
votes
6answers
4k views

Recursive search doesn't work for grep on solaris

On out Solaris server I'm finding that grep -r doesn't work, which is the usual way that I used grep. It seems that egrep is the same. Given that I have no control over the machine, is there a way to ...
4
votes
2answers
1k 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 ...
4
votes
2answers
244 views

Compiling old solaris programs under Linux

I've got sources for a program developed under Solaris in ANSI-C. I am told it was developed around 1996-1997. I'm currently struggling with compiling it under a current Ubuntu. I got pretty far and I ...
4
votes
3answers
271 views

Do BSD and SunOS have multithreaded architectures?

I'm interested in operating systems that have a multithreading architecture, like Mach and BeOS; not ones that depend on libraries like POSIX to be multithreading. Do BSD and SunOS have a ...
4
votes
2answers
3k 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 ...
4
votes
3answers
2k 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 ...
4
votes
2answers
301 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 ...
4
votes
1answer
1k views

ssh tunneling a local display to another server

I have a GUI test stand simulation connected to some hardware that is under test. The test stand is a Sun Sparc Ultra 2 SunOs 5.7. The simulation software checks to see if your running your display on ...
4
votes
2answers
161 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 ...
4
votes
3answers
3k views

How to delete a range of mails in Solaris using the 'mail' command?

I have some 1k+ mails in an inbox (old cronjob stdout), how to 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 and ...
4
votes
2answers
456 views

What is the STATE column of the TOP command on Solaris?

I'm running a very large, memory intensive program on my new UNIX server and trying to fully understand the output of the "top" command. Here is what I see right now (showing only the first process): ...
4
votes
2answers
718 views

What process is accessing a mounted filesystem sporadically?

I have a Solaris 10 server with autofs-mounted home dirs. On one server they are not unmounted after the 10 min timeout period. We've got AUTOMOUNT_TIMEOUT=600 in /etc/default/autofs, I ran automount ...
4
votes
1answer
462 views

Ksh loses data after piping 16K bytes

I recently found that ksh may lose some data after printing more than 16K bytes to the stdout if it is blocked for a couple of seconds. This test.sh script prints out 257*64 (16448) bytes: ...
4
votes
6answers
11k 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
4
votes
1answer
549 views

Restoring an open file

I have an interesting problem which may or may not have a solution but I'd love to have one if possible: On Solaris an open log file has been removed, which still continues to be populated while the ...