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.
19
votes
3answers
30k 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 commmand, with the following arguments:
-f Generates a full listing. ...
13
votes
9answers
6k 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 ...
11
votes
4answers
704 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?
9
votes
1answer
262 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
2k 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
4answers
388 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 ...
8
votes
0answers
190 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
4answers
965 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 ...
7
votes
1answer
767 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
1answer
3k 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
912 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
312 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
196 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
2answers
636 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 ...
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
230 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
1k 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 ...
5
votes
5answers
4k 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 ...
5
votes
6answers
5k 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 ...
5
votes
3answers
1k 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
2answers
179 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
334 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 ...
5
votes
1answer
3k 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 ...
4
votes
2answers
643 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
127 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 ...
4
votes
5answers
8k 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 ...
4
votes
3answers
214 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
229 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
943 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
173 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
282 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
1answer
437 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 ...
4
votes
3answers
353 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, ...
4
votes
3answers
2k views
Is there a yum or apt-get like system on Solaris?
I am aware of the use of pkg to install an individual package file, but it does not include a repository infrastructure like other Linux distributions. Is there any solution that behaves like yum or ...
4
votes
1answer
848 views
Obtaining Solaris 10 patches
I have a Solaris 10 server. I've been trying to find from where I can download patches/updates.
The specific bug I'm running into (http://bugs.opensolaris.org/view_bug.do?bug_id=6551484) is ...
4
votes
2answers
141 views
How to get notified when svcadm restarts a service that died
I'm using svcadm to keep my node.js server running on Illumos, is there a way to get notified if svcadm restarts the server because it crashed? Specifically if the process went down on its own and not ...
4
votes
2answers
373 views
list header files used by a project compiled with gcc along with hierarchy
I currently have a C++ project that spans two different source control systems. Without checking in the full complete source code from the first system into the second system I plan to check in just ...
4
votes
2answers
872 views
What does “pollsys” mean? Solaris “truss” output
> truss -p 6482
/2: pollsys(0xE517AD88, 1, 0xE517AE30, 0x00000000) = 0
/2: pollsys(0xE517AD88, 1, 0xE517AE30, 0x00000000) = 0
/2: pollsys(0xE517AD88, 1, 0xE517AE30, 0x00000000) = 0
...
3
votes
2answers
493 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
...
3
votes
3answers
762 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", ...
3
votes
2answers
365 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 ...
3
votes
6answers
974 views
Difference between “echo $SHELL” and “which bash”
I am trying to determine the location of bash interpreter on my Solaris system and I am a bit confused. When I type:
echo $SHELL
The resulting path is:
/bin/bash
And when I type:
which bash
I ...
3
votes
6answers
1k 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 ...
3
votes
2answers
985 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 ...
3
votes
2answers
171 views
Read a file and copy to another file
I'm having a issue, I need to copy the file contents and remove a couple of lines if they match the output from a previous command. But so far, I'm having an issue in maintaining the file lines ...
3
votes
4answers
513 views
Formatting the output: Underlining
I wrote the following function in ksh that prints its first argument to the screen and underlines it with the appropriate ammount of - character:
print_underlined () {
word=$1
echo $word
...
3
votes
3answers
499 views
Why does this password fail AIX and Solaris rules
Had to reset my password on a couple of client servers today, and despite following the rules I get the message "Your password failed to meet: minimum of 2 non-alphabetic characters" back from the ...
3
votes
3answers
600 views
Solaris: find the day of last Monday,Tuesday,…Sunday by means of shell script
I'm trying desperatly to find a bash or ksh routine that allows me to find for example the previous Monday,Tuesday,Wednesday,... preceding today's date. Additonal it has to work on plain vanilla ...
3
votes
2answers
2k views
Sed: Replace N first occurrences of a character
I am looking to replace the 5 first occurences of the whitespace character per line inside a sed script. Here's what I have so far
sed -e "s/ /;/" -e "s/ /;/" -e "s/ /;/" -e "s/ /;/" -e "s/ /;/" ...
3
votes
1answer
769 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 ...