Unix OS

32K

Solutions

18K

Contributors

Unix is a multitasking, multi-user computer operating system originally developed in 1969 at Bell Labs. Today, it is a modern OS with many commercial flavors and licensees, including FreeBSD, Hewlett-Packard’s UX, IBM AIX and Apple Mac OS-X. Apart from its command-line interface, most UNIX variations support the standardized X Window System for GUIs, with the exception of the Mac OS, which uses a proprietary system.

Share tech news, updates, or what's on your mind.

Sign up to Post

what is the meaning of below command

less log123.log | grep -i nullpointerexception


why we use less and then grep on it

Please advise
0
Cloud Class® Course: Microsoft Azure 2017
LVL 12
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

in vi we can use /nullpointerexception to find that string right.

how to find how many occurrence of that string total and go to say 10th occurence line
please advise
0
when i open with winscp that opens old stale file compared to putty opening of same file say xyz.ccfg

i wonder why winscp does not show recent changs?

please advise
0
tail -f logfile.log


what is the meaning of above command.

i see logs rolling too fast.

is there is a way i can slow it down to see clearly slowly

any god tips, links, resources on how to debug production logs efficiently just using putty without any fancy costly tools?

please advise
0
i have files how can i get there size in gb
0
Error in getting maxsize for diskgroup using vxassist


[root@test]# vxassist -g vxosdg  maxsize
VxVM vxassist ERROR V-5-1-18301  No volume can be created within the given constraints
[root@test]#

[root@test]# vxdg free
GROUP        DISK         DEVICE       TAG          OFFSET    LENGTH    FLAGS
testdg       98632345GDFE5F92480D7BB localhost_disk_0 localhost_disk_0 293601280 335450112 -
[root@test]#


[root@test]# vxassist -g testdg maxgrow data
Volume data can be extended by 335450112 to: 419336192 (204754Mb)
[root@test]# vxassist -g testdg make testvol 1g
VxVM vxassist ERROR V-5-1-18301  No volume can be created within the given constraints
[roo@test]#
0
difference between double and single quote in unix vs windows word document


1.
grep ‘Bean’ abc_1.log.20180627 //i am able to type this angular single quote in windows laptop in a word pad to save all commands to copy paste to unix box

2.
grep 'Bean' abc_1.log.20180627//why i cannot type this straight single quote character on windows laptop in a word pad to save all commands to copy paste to unix box?
3.
grep "Bean" abc_1.log.20180627


when i type below in word document of windows its shows as

grep ‘Bean’ abc_1.log.20180627
when i type below in putty/mputty of windows its shows as
grep 'Bean' abc_1.log.20180627



my purpose is to save all these unix queries to a word document so that next time i can copy paste from word document to putty and execute them without any tweaking to queries.

Please advise
grepCommands.png
0
I have a system HP-UX with rel 11.31

My problem is after delete lun from storage , i continue to see lun on system :

[root@accs2067]:/> scsimgr -p get_attr all_lun -a hw_path -a device_file -a wwid -a serial_number  | grep 43c
64000/0xfa00/0x13:/dev/rdisk/disk277:0x600507680c800172f00000000000043c:"020320005cbcXX00"

I've already removed the NO-HW with rmsf -vH <path hw> but with command upon i continue to see the lun

on system the lun correctly don't see :
[root@accs2067]:/> diskinfo /dev/disk/disk277
diskinfo: can't open /dev/disk/disk277: Invalid argument

Is possible erase by SCSI management ?
0
This is solaris-10 zone and it is repeated issue, I am seeing since sometime. Due to some reason, syslog is holding space and it keeps filling root file-system. I had to nullify process file of syslog and then space consumption of root was reduced from 19 GB to 2.7GB
bash-3.2# svcadm disable svc:/site/system/syslog-ng:default
bash-3.2# find /proc -type f -links 0 -ls | sort -n +6 | tail
find: stat() error /proc/11835/fd/43: No such file or directory
find: stat() error /proc/11820/fd/43: No such file or directory
find: stat() error /proc/11829/fd/43: No such file or directory
find: stat() error /proc/11821/fd/43: No such file or directory
find: stat() error /proc/11827/fd/43: No such file or directory
find: stat() error /proc/11825/fd/43: No such file or directory
find: stat() error /proc/11833/fd/43: No such file or directory
find: stat() error /proc/11826/fd/43: No such file or directory
find: stat() error /proc/11832/fd/43: No such file or directory
4213633025    4 -rw-------   0 root     root         2048 Apr 12 13:23 /proc/1222/fd/6
4213638852    4 -rw-------   0 root     root         2048 May 27 21:09 /proc/1222/fd/4
45240   73 -r--r--r--   0 adm      adm         73656 Apr 13 00:36 /proc/2140/fd/3
48364 17038328 --w-------   0 root     root     17434106014 Jun 21 16:41 /proc/3065/fd/6
48364 17038328 --w-------   0 root     root     17434106014 Jun 21 16:41 /proc/3065/fd/8
bash-3.2# ps -ef | grep 3065
    root  3065  1140   0   Apr 12 ?         645:53 

Open in new window

0
TSM 7.1 running on AIX 7.1 -Is there a way to restore only the folder structure and not the files within those directories? The restore of Oracle RMAN will populate the directory structures with the files. Thanks in advance!
0
Cloud Class® Course: CompTIA Cloud+
LVL 12
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

i would like to know whether any additional slots are available for HBA card in Solaris node (2 Dual port or 1 Quad 4 port HBA). How to check free slots .

1. fcinfo hba-port showing all ports being used
2. luxadm -e port showing one path as not connected .

luxadm -e port
/devices/pci@400/pci@1/pci@0/pci@8/SUNW,qlc@0/fp@0,0:devctl        CONNECTED
/devices/pci@400/pci@1/pci@0/pci@8/SUNW,qlc@0,1/fp@0,0:devctl      CONNECTED
/devices/pci@400/pci@2/pci@0/pci@8/SUNW,qlc@0/fp@0,0:devctl        CONNECTED
/devices/pci@400/pci@2/pci@0/pci@8/SUNW,qlc@0,1/fp@0,0:devctl      NOT CONNECTED
0
Hi everyone!
I am trying to do a few things in my bash script (script1.sh):  pass logicals/variables to my SAS program (program1.sas), execute SAS code (program1.sas), check with "errstat" for specific errors related to SAS code conditions that I set up in my SAS code, and also check with "logerrchk" SAS log file for any errors in the SAS log.  
I think most of the script is correct but I am not sure about both checking errors (errstat" and "logerrchk").

 Please note: variable/logicals (file1, file2, plog, and errstat) are also defined in the SAS program.  

 Please provide any suggestions or examples if you can.
 Here is what I have so far:

#!/bin/bash
#script1.sh

# Creating variables for directories
export DATADIR1=/root/alldirs/2018/data1
export DATADIR2=/root/alldirs/2018/data2
export DATADIR3=/root/alldirs/2018/data3
export PROGDIR1=/root/alldirs/2018/prog1

#Creating variables for data files that are used in program1.sas and final log file 
export file1=${DATADIR1}/sasdata1.sas7bdat
export file2=${DATADIR2}/sasdata2.sas7bdat
export plog=${DATADIR3}/sas_program.log

#executing SAS program
sas ${PROGDIR1}/program1.sas -log ${DATADIR3}/program1.log

#checking for errors in SAS log file
logerrchk=$?     
   if [[ "$logerrchk" !=0 ]]; 
   then 
       echo "--- Error: Abnormal end in program program1.sas. Check log file! ---" >> $plog
       exit 2
   else
       echo "--- Program1.sas run successfully! ---" >> $plog
   fi
  
#checking for specific errors 

Open in new window

0
hi am geting this error when starting my linux
linux
0
SCO Unix 5.05 Network Issue

So let me start by saying Im not familiar with Uniex. I had to reset the router here at my work yesterday and redo the network. This in turn lost the ip address settings in the router and now our Unix server is not connecting with the router or sending emails in visifax. I tried changing the static ip that was set up from 192.168.1.254 to 192.168.1.144 as the new router issues 192.168.1.100 through 192.168.1.149 ip address. I used netconfig for this and it took the change but to no avail. Now im dead in the water. I dont know what to check or what to change to allow for it to make a proper connection to our router. The pc's here can connect to the server through the serial direct connections and also access the router fine through the network. Any help or advice would be APPRECIATED!!!
0
on my windows 10 machine after installing oracle virtua box and centos on top of it while starting getting below error


Failed to open a session for the virtual machine centos.

The virtual machine 'centos' has terminated unexpectedly during startup with exit code 1 (0x1).  More details may be available in 'C:\Users\saiganesh\VirtualBox VMs\centos\Logs\VBoxHardening.log'.

Result Code: E_FAIL (0x80004005)
Component: MachineWrap
Interface: IMachine {b2547866-a0a1-4391-8b86-6952d82efaa0}

i tried on other laptop i do not see red hat 64 some reason but shows red hat 32 bit

Please advise
centos.png
centos.png
0
how to remember shell history and how to save unix queries for future use and share with the team

$HISTSIZE can be increased to unlimited size?

how to type attached l character

please advise
L_char.png
0
how below commands are different

su department (when i do pwd here says department)
vs
su - department(when i do pwd here says /home/department)

when i do below

su -c 'echo $echo  $DEPARTMENT_HOME' department
it does not work

when i do below

su -c 'echo $echo  $DEPARTMENT_HOME'  - department
it does work. Please advise the difference.

what is difference between
department and  /home/department

how su and sudo are different?

how can there is depearment inside home as well as outside at top level again?

what is visudo and sudoers file or folder?

Please advise
0
difference between below process killing signals

kill -15 123

vs

kill -TERM 123
vs

kill -9 123


how foreground and background processes are different and how to kill or suspend them?
is PID is always 4 digit or it can be 10 digit etc?

how job and process different?
how to distinguish between background and foreground jobs?

when i say
jobs

it simply shows 5 different jobs one with + other with -

but does not show whether background or foreground?

i have a job running in background i brought it to foreground and stopped it.
when i moved it again to background it automatically moved to RUNNING status? how this is possible?
how terminated suspended and killed etc are different?
Please advise
0
I am unable to install nodejs on Solaris-10 x86 server. It is complaining about some libraries . Can somebody guide on this ?
-bash-3.2# cat /etc/release
                    Oracle Solaris 10 1/13 s10x_u11wos_24a X86
  Copyright (c) 1983, 2013, Oracle and/or its affiliates. All rights reserved.
                            Assembled 17 January 2013
-bash-3.2# pwd
/var/tmp/node-v8.11.2-sunos-x64/bin
-bash-3.2# ./node
ld.so.1: node: fatal: libsocket.so.1: version 'SUNW_1.7' not found (required by file node)
ld.so.1: node: fatal: libsocket.so.1: open failed: No such file or directory
Killed
-bash-3.2# ldd node
        libkstat.so.1 =>         /lib/64/libkstat.so.1
        libumem.so.1 =>  /lib/64/libumem.so.1
        libsocket.so.1 =>        /lib/64/libsocket.so.1
        libsocket.so.1 (SUNW_1.7) =>     (version not found)
        libnsl.so.1 =>   /lib/64/libnsl.so.1
        libsendfile.so.1 =>      /lib/64/libsendfile.so.1
        libstdc++.so.6 =>        (file not found)
        libm.so.2 =>     /lib/64/libm.so.2
        librt.so.1 =>    /lib/64/librt.so.1
        libgcc_s.so.1 =>         (file not found)
        libpthread.so.1 =>       /lib/64/libpthread.so.1
        libc.so.1 =>     /lib/64/libc.so.1
        libc.so.1 (ILLUMOS_0.17) =>      (version not found)
        libc.so.1 (ILLUMOS_0.8) =>       (version not found)
        libmp.so.2 =>    /lib/64/libmp.so.2
        libmd.so.1 =>    /lib/64/libmd.so.1
        libscf.so.1 =>   /lib/64/libscf.so.1
        

Open in new window

0
Cloud Class® Course: SQL Server Core 2016
LVL 12
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

$ emacs xyz.log
-bash: emacs: command not found

i am getting above error.

how to install and use emacs.

vi is better or emacs is better to use?

what is
meta D means
how it is different from control D


please advise on advantages, disadvantages of each
0
how to install and use nano editor

$ nano
-bash: nano: command not found




I get above error.

Please advise
0
what are differences, advantages, disadvantages of octal decimal binary symbolic rwx and all  permissions to user, group, other
while adding modifying setting permissions
when we use umask?

Please advise
0
what is meaning of  below command in unix
$echo $PATH
i got output like

:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/gggggg/bin
what is meaing of :

why it shows bin and sbin so many times
what is usr and local here and what is root and how that is different from root?
also what is meaning of which command

$which cat
$tree -cd

please advise
0
Hi

I am building net-snmp 5.7.3 on Solaris11. I am having my path set as:

/usr/local/lib:/bin:/usr/bin:/usr/dev_infra/platform/bin:/usr/dev_infra/generic/bin:/usr/local/bin:/usr/X11R6/bin:/usr/local/ade/bin:/usr/sfw/bin:/usr/ccs/bin:/opt/csw/bin:/opt/csw/gnu:/usr/sbin:/usr/bin:/usr/ccs/bin/ar


I run  ./configure --prefix=/opt with default option and it was successful. After that when i do make, i am getting below error message, Any help is appreciated.


libtool: compile:  gcc -I../include -I. -I../snmplib -fno-strict-aliasing -g -O2 -Usolaris2 -Dsolaris2=solaris2 -c keytools.c  -fPIC -DPIC -o .libs/keytools.o
keytools.c: In function ‘generate_Ku’:
keytools.c:153:9: warning: assignment makes pointer from integer without a cast
keytools.c:161:9: error: invalid use of void expression
keytools.c:166:13: error: invalid use of void expression
*** Error code 1
make: Fatal error: Command failed for target `keytools.lo'
Current working directory /scratch/kkumsati/net-snmp/snmplib
*** Error code 1
The following command caused the error:
if test "snmplib  agent apps man local mibs" != ""; then \
        it="snmplib  agent apps man local mibs" ; \
        for i in $it ; do \
                echo "making all in `pwd`/$i"; \
                ( cd $i ; make ) ; \
                if test $? != 0 ; then \
                        exit 1 ; \
                fi  \
        done \
fi
make: Fatal error: Command failed for target `subdirs'
0
I am trying to migrate a Hpunix 10.2 system to a newer system using CentOS 7.

HPunxi is a J6000 two CPUs running a 500 Mhz with 4 gigs of ram 26 drives mirrored 15,000 rpm.
We have 20 users max running one application using XDMCP over the network with 100 mbs Due to j6000 configurations.

CentOS 7:
will be using XRDP instead of XDMCP and so there will be more load on the server for Graphics.

I need some help on this and which GPU to get for the Dell server.

Regards,
0

Unix OS

32K

Solutions

18K

Contributors

Unix is a multitasking, multi-user computer operating system originally developed in 1969 at Bell Labs. Today, it is a modern OS with many commercial flavors and licensees, including FreeBSD, Hewlett-Packard’s UX, IBM AIX and Apple Mac OS-X. Apart from its command-line interface, most UNIX variations support the standardized X Window System for GUIs, with the exception of the Mac OS, which uses a proprietary system.