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.
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 ...
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. ...
7
votes
4answers
970 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 ...
3
votes
2answers
986 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 ...
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 ...
3
votes
4answers
605 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 ...
3
votes
2answers
1k views
Solaris 10 boot from cd-rom
I am trying to start up my solaris server using the newly downloaded iso written on a CD.
The iso name is sol-10-u9-ga-sparc-dvd.iso
When we started the server, logging in as root then tried to boot ...
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, ...
4
votes
1answer
283 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:
...
2
votes
1answer
611 views
ps command not giving output in home directory
I am logging into a solaris server, switching to bash, then switching to another user "sruser" and switching to bash.
/home/batch/sruser/ is the home directory of the user "sruser".
The issue is ps ...
1
vote
1answer
242 views
How do I set Keyboard and profile preferences when connecting to Solaris via SSH?
I'm connecting to a Solaris box from Mac OS X. Whenever I have connected to linux boxes in the past it has been much easier to navigate around. How do I fix these configuration issues on Solaris?
...
8
votes
0answers
191 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 ...
3
votes
2answers
199 views
filesystem image mounted with lofiadm looks smaller than expected
I have a .gz file and I'd like to see the content of it. I used lofiadm to mount it.
lofiadm /backup/file.gz ->> returned /dev/lofi/1
mount -F ufs /dev/lofi/1 /mnt
Then I checked the content ...
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
1k views
How to lock on Solaris 10?
On Linux I use flock lock command to execute a command with an exclusive lock.
What is the standard operating system command of Solaris 10 to do the same in a shell?
1
vote
1answer
234 views
Remap Caps_Lock to Control in Solaris
I'm having the hardest time trying to understand how xmodmap works. I want to remap the Caps Lock key to Control.
In an attempt to emaulate the answers shown here, I created the file .xmodmaprc:
...
0
votes
1answer
29 views
Solaris development host
This posting aims to document how go about getting a development host on Solaris.
A "development host" is one where you have all the appropriate tools to build and compile C or C++ applications.
...
0
votes
2answers
83 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
2answers
164 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??