Usage void type in C:
sizeof void type is implemented as "1". And In "C" we can have the flexibility to increment the void pointer.
Usage of void type in C++:
In C++, incrementing "void" pointer is not permitted. And sizeof(viod type) throws an error saying that type is unknown.
Showing posts with label General. Show all posts
Showing posts with label General. Show all posts
23.1.09
23.7.08
know your terminal
How to know through which terminal we connected to particular machine or present terminal type.
we have "who -a" commands which list the all the users presently logged in system. but how you will come to know with which terminal presently we connected.
let say the "who -a" output is:
to know with which terminal we connected
use "tty" commnad.
Use TTY commnad to know on wich terminal u are working now or what is ur terminal.
we have "who -a" commands which list the all the users presently logged in system. but how you will come to know with which terminal presently we connected.
let say the "who -a" output is:
. system boot Jun 30 19:51
. run-level 3 Jun 30 19:51 3 0 S
rc2 . Jun 30 19:54 old 89 id= s2 term=0 exit=0
rc3 . Jun 30 19:54 old 1750 id= s3 term=0 exit=0
LOGIN console Jun 30 19:54 1:53 2225 id= dt term=15 exit=0 (:0)
sac . Jun 30 19:54 old 2443 id= sc
root + console Jun 30 20:40 1:53 2444
sctpd . Jun 30 19:54 old 2447 id= US
start_DF + null Jun 30 19:54 . 2448
sufd_rc_ . Jun 30 19:54 old 2449 id=SUFD
zsmon . Jun 30 19:54 old 2503
.telnet /dev/pts/3 Jul 15 14:24 2349 id=t100 term=0 exit=0
root + pts/3 Jul 22 16:27 . 578 (10.143.64.25)
root pts/2 Jul 22 18:46 old 20139 id=ts/2 term=0 exit=0
.telnet /dev/pts/4 Jul 15 14:21 29587 id=tt/2 term=0 exit=0
.telnet /dev/pts/6 Jul 15 14:21 29594 id=tu/2 term=0 exit=0
root pts/4 Jul 22 18:46 old 5089 id=ts/4 term=0 exit=0
to know with which terminal we connected
use "tty" commnad.
#tty
/dev/pts/3
Use TTY commnad to know on wich terminal u are working now or what is ur terminal.
shared library comes with which package
How to know to which package the specified shared library belongs.
Sometimes it's required to know with which package particular shared library came.
There is a way to find this in solaris.
grep <> "/var/sadm/install/contents"
example to know with which package "libc.so" came
#grep libc.so /var/sadm/install/contents
Sometimes it's required to know with which package particular shared library came.
There is a way to find this in solaris.
grep <> "/var/sadm/install/contents"
example to know with which package "libc.so" came
#grep libc.so /var/sadm/install/contents
Recursive grep in solaris
In solaris "grep" tool don't have option to grep the specified "pattern" recursively(not like linux) under current directory.
Generally "grep" tool grep the pattern in current directory only.
Workaround for this is:
Have to use "find" command to get the all the files and "piped" this data to grep command.
#find . -type f | xargs grep "pattern"
Generally "grep" tool grep the pattern in current directory only.
Workaround for this is:
Have to use "find" command to get the all the files and "piped" this data to grep command.
#find . -type f | xargs grep "pattern"
How to add User in Soalris ( Unix)
Adding user in solaris
useradd -d -m -s username.
Here adding user name called "raj", having home directory "/export/home/raj" and shell as "sh"
# useradd -d /export/home/raj -m -s /bin/sh raj
useradd -d
Here adding user name called "raj", having home directory "/export/home/raj" and shell as "sh"
# useradd -d /export/home/raj -m -s /bin/sh raj
26.6.08
ld.so.1: fatal: .so: open failed: No such file or directory
This problem comes when the required ( liked *.so) libraries were not exist in the proper location in the system or the libraries not exist in system at all.
Remedy:
To know exactly which libraries are missing:
execute this command.
ldd "binaryname"
If any of the binary is missing it says
Subscribe to:
Posts (Atom)