Unix OS

32K

Solutions

23

Articles & Videos

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

Hi expert

How to upload SSL to openLdap server?
0
Transaction Monitoring Vs. Real User Monitoring
LVL 1
Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

I have xlc compiler version 8 and perl 5.10 running on AIX 7.1. I have been able to install DBI.pm module successfully, but now am in need to install DBD::ORACLE module. The oracle version is 12 (64bit)

perl Makefile.PL runs fine for the DBD::ORACLE module, however the "make" command is throwing below error:
I attempted to fix the issue by changing the object mode value, but that end up giving a different type of error.
Can you advise on the solution ?

#make
        rm -f blib/arch/auto/DBD/Oracle/Oracle.so
        LD_RUN_PATH="/u01/app/oracle/product/12.1.0/client_1/lib:/u01/app/oracle/product/12.1.0/client_1/rdbms/lib" ld  -bhalt:4 -G -bI:/usr/opt/perl5/lib/5.10.1
            /aix-thread-multi/CORE/perl.exp -bE:Oracle.exp -bnoentry -lpthreads -lc -lm -L/usr/local/lib Oracle.o  dbdimp.o  oci8.o /lib/crt0_64.o -bI:/usr/lib/iocp.
            exp  -o blib/arch/auto/DBD/Oracle/Oracle.so     -L/u01/app/oracle/product/12.1.0/client_1/lib/ -lclntsh -lclntshcore -lld -lm -ldl -lc -lm -lpthreads -
            lodm
            -lbsd_r -lld -lperfstat -lm -lpthreads
ld: 0711-736 ERROR: Input file /lib/crt0_64.o:
        XCOFF64 object files are not allowed in 32-bit mode.
make: The error code from the last command is 8.

#bootinfo -K
64

#ORACCENV='cc=xlc_r'; export ORACCENV

#export OBJECT_MODE=64
#make
        rm -f blib/arch/auto/DBD/Oracle/Oracle.so
        LD_RUN_PATH="/u01/app/oracle/product/12.1.0/client_1/lib:/u01/app/oracle/product/12.1.0/client_1/rdbms/lib" ld  -bhalt:4 -G …
0
I recently upgraded AIX from 6.1 to 7.1, which resulted in perl getting upgraded from 5.8 to 5.10 as well and in process i no longer have a dbi.pm module under perl 5.10.

I have been unable to find binary version for dbi.pm for perl 5.10 so i am trying to compile it but running into an issue with it.
I am using steps of running perl Makefile.PL, make, make test, make install to compile.
I am able to successfully run perl Makefile.PL from the dbi.pm directory that i saved in /tmp from cpan.org, but when i run the "make" command, i get following error.

Skip blib/lib/DBI/ProfileData.pm (unchanged)
        xlc_r -q32 -c    -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=-1 -qnoansialias -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -qlanglvl=extended -I/usr/local/include -q32 -D_LARGE_FILES -qlonglong -O    -DVERSION=\"1.636\"  -DXS_VERSION=\"1.636\"  "-I/usr/opt/perl5/lib/5.10.1/aix-thread-multi/CORE"   Perl.c
/bin/sh: xlc_r:  not found
make: The error code from the last command is 127.

I do have xlc compiler installed.
  vac.C                      8.0.0.0  COMMITTED  IBM XL C Compiler
  vac.C                      8.0.0.0  COMMITTED  IBM XL C Compiler
  vacpp.cmp.core             8.0.0.0  COMMITTED  IBM XL C/C++ Compiler
  vacpp.cmp.core             8.0.0.0  COMMITTED  IBM XL C/C++ Compiler
  xlC.aix61.rte             12.1.0.3  COMMITTED  IBM XL C++ Runtime for AIX 6.1

/usr/vacpp/bin/xlC -qversion
IBM XL C/C++ Enterprise Edition V8.0 for AIX
Version: …
0
I have a file with a character that translates into 272 when I do:
od -xc

The character looks like an A with a caret on top with a degree sign to the right. I am attaching an image of the character as well. I have tried sed, perl and tr and none of them are working.

For example:
sed -e 's/'$(echo "272")'/ /g' input_file > output_file

This does not work.

Any suggestions?
Image.jpg
0
I am creating a shell script to check if cron jobs are enabled/disabled and send a mail notification for the same (with job name).

#!/bin/sh

crontab -l > /app/file.txt
App_Home=/app
ctab='$APP_Home/file.txt'

while IFS= read -r value; do
entry=`$value | awk '{print $1}'`
echo $entry
if [[ $entry == "#" ]]
then
  echo " Entry $value is disabled "
elif [[ $entry == '#*' ]]
then
   echo " Entry $value is disabled "
else
   echo " Entry $value is enabled "
fi
done < $ctab

Open in new window


However, the above code is failing with the error message (#*: command not found).
0
Imagine the following scenario:

A NAS box, providing a samba share, with several versions of a fíle collection in dated directories (name i.e. "2017.05.24").

On the NAS should be some links into subdirectories of the latest version, so the copy script should create symbolic links on the share to the latest version of that file collection.

When I try
ln -s <samba_share/link_name> <samba_share/dated_dir_subdir/>

Open in new window

I get an error that this is not possible. Any hint ?
0
when it displays "Global Group memberships", it it is long, then it is only partially seen. is there a way you break it down to many single line step output?
0
Hi Experts,

I am using below command to send file as body instead of attachment, I am able to do that but I want to send subject in french also.

cat french_characters.txt | mailx -s "RELEVÉ" -S ttycharset=iso-8859-1 -S sendcharsets=iso-8859-1 -S encoding=8bit email@email.com

This only send file as body in french charaters but not subject.

How do I do that?

Thanks in Advance.
0
Problem with external aerial and galleonm time server just turned back on. I'm guessing this is telling me its not worked for 9 days?

Should I now force a poll or wait?



Code:
$ntpq -p
     remote           refid      st t when poll reach   delay   offset    disp
==============================================================================
 time-p1      .MSF.            1 -   9d   64    0     0.43    0.027 16000.0
 time-s1      0.0.0.0         16 -    - 1024    0     0.00    0.000 16000.0
*LOCAL(0)        LOCAL(0)         9 l   25   64  377     0.00    0.000   10.01
0
Having a bit of a discussion with a software vendor about this. Can anyone confirm my understanding?

/etc/sudoers file example:-

user1 server1 = NOPASSWD:/usr/bin/ls -l
user1 server1 = NOPASSWD:/usr/bin/file

Open in new window


But then the following command fails (logged in on server 1 as user1) because its not in sudoers file.

sudo java abc.jar

Open in new window


Surely this is correct? You can't sudo a command unless you have appropriate permissions in /etc/sudoers? Am I right?
0
Industry Leaders: We Want Your Opinion!
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

hi,
i have a xml file like below.

<title> <line1>Abc</line1><line2>bce</line2></title>.

i need to pull only line2 value. how can i do in solaris.
i tried sed and awk but no luck..

can help to get simple command or script to pull out such values.

thanks
0
I'm trying to chroot jail SFTP service on AIX 7.2 system. What I mean is to allow users from 'sftpgrp' group to ONLY SFTP access. Authentication is through SSH KEys (no passwd). Also, no SSH login is allowed for users inside 'sftpgrp' group.

Until now SFTP chrooted is working properly, I mean, users in sftpgrp group access their chrooted HOME DIRECTORY without problem.

But, the problem is  the problem is when theses users try to SSH (using Pub KEy) the same server, I this error:

/dev/pts/5: No such file or directory
open /dev/tty failed - could not set controlling tty: No such device

See part of debuged log from SSHD:

.
.
debug3: aix_restoreauthdb: restoring old registry ''
debug1: audit session open euid 0 user iga3 tty name /dev/pts/5
debug3: mm_request_send entering: type 26
debug3: mm_answer_pty: tty /dev/pts/5 ptyfd 6
debug1: session_pty_req: session 0 alloc /dev/pts/5
debug1: Ignoring unsupported tty mode opcode 42 (0x2a)
debug1: server_input_channel_req: channel 0 request shell reply 1
debug1: session_by_channel: session 0 channel 0
debug1: session_input_channel_req: session 0 req shell
debug1: Forced command (config) 'internal-sftp -l INFO'
debug1: Values: options.num_allow_users: 0
debug1: RLOGIN VALUE  :0

debug3: mm_audit_run_command entering command internal-sftp -l INFO
debug3: mm_request_send entering: type 57
/dev/pts/5: No such file or directory
open /dev/tty failed - could not set controlling tty: No such device
debug3: 

Open in new window

0
Hi,

what are the best practices and features, options while using grep.

i am using these days to search in log files, files, directories, content etc

When should i give single quote '  '
like
zgrep 'xyz' aaa.gz


When should i give double quote " "
like
zgrep "xyz" aaa.gz


how to use tail and head etc along with grep to effectively monitor last or first 100 lines etc
please advise
0
Hi,

I keep getting below error when i wrote hello.sh shell script file and try to open it to.



Swap file ".hello.sh.swp" already exists!
[O]pen Read-Only, (E)dit anyway, (R)ecover, (Q)uit, (A)bort:



why it created .swp file autoatically?
why it asks above question. How to tell unix not to ask that question.
please advise
0
Hi,

https://bash.cyberciti.biz/guide/Hello,_World!_Tutorial

I created hello.sh script using vi hello.sh
then typed below

echo "Hello, World!"
echo "Knowledge is power."

do i need to tyope below line as well at top?

#!/bin/bash
what above line means?

when i try to execute gets errror as

$ ./hello.sh
-bash: ./hello.sh: Permission denied



please advise
0
Hi,

I am trying below program

http://www.programmingunit.com/2013/04/19/shell-script-to-check-leap-year/

how to save and execute above shell script and see output and send output to different files say test123.txt. please advise

i tried using vi editor as sample.sh and pasted content.

did esc to escape from isnert mode then shift zz to comeback to regular screen from vi mode

]$ vi sample.sh

[1]+  Stopped                 vim sample.sh

Not sure what it mean by stopped as above i saw message

when i ran getting error
]$ ./sample.sh
-bash: ./sample.sh: No such file or directory

when i do ls -ltr i do not see sample.sh though
0
Hi,
what are differences between
user defined, environmental. local, global variables

when to use which one. what are advanatages, disadvantages of using each with practical examples.
please advise
0
Hi,

I like to write a unix shell script to check calendar year, date, current working directory.

how to write and shave .sh file(Say test.sh) and how to execute to see the output.

Any detailed link explaining these steps with screenshots. please advise
0
What are differences between
touch cat vi differences

which one is better to use to create a file. When to use which one. please advise
0
On Demand Webinar: Networking for the Cloud Era
LVL 8
On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

what is the meaning of below command.
it removed hello
sed -n '/hello/!p' aaaa.txt

why we are giving ! and p there?
please advise
0
umask 133;touch dir2

why above command created the directory with 501 permission when i do umask
-rw-r--r-- 1 xxxxxxx 501    0 May  3 16:38 dir2


how to give read write etc all permisson?


$ umask 111;touch file1.txt


-rw-rw-rw- 1 xxxxxxxx 501    0 May  3 16:36 file1.txt

why above command created the file with 501 permission when i do umask.
how to give read write etc all permisson?

is not 777 is all permision?
0
Hi,

When we use below

comm diff cmp unix commands

when i ran comm command why it gave below out put
$ comm aaa.txt aaaa.txt
a
b
c
d
ssssshhhqqq
        this is gp
        writing
comm: file 2 is not in sorted order
        here
        and
        all


what it means by sorted order not there?

please advise
0
Hi,

unix how to search all linked and hidden files in current directory.

any good comprehensive link to read all unix command one place.
how to use manual

like

manual help for varios commands lilke grep etc

my prompt is like $
not sure which version or flavor of unix i have. how to check it?

Please advise
0
i have fixed length file 'input.txt' as below in a remote location
abcdefgh001lmnopqrs
abcdefgh002lmnopqrs
abcdefgk001lmnopqrs
abcdefgh001lmnopqrs
abcdefgh004lmnopqrs

my result should have the count of records that are having h001 in position 8-11
i tried some thing like below.. still not getting result when run through command prompt
awk 'substr($1,9,11) =="h001" {print}'  //path/input.txt
0
My NIM Master is at 7.1.TL2 and client at 6.1 TL9. I have successfully migrated another server with same level recently, but don't understand why I'm getting this error. Can anyone help please.

Executing nimadm phase 8.
+-----------------------------------------------------------------------------+
Creating client boot image.
0301-154 bosboot: missing proto file: /usr/lib/drivers/pci/sischn_dd
0505-180 nimadm: Error creating client boot image.
Cleaning up alt_disk_migration on the NIM master.
Unmounting client mounts on the NIM master.
forced unmount of /nimclient6109_alt/alt_inst/var
0505-158 nimadm: WARNING, unexpected result from the fuser command.
umount: 0506-347 Cannot find anything to unmount.
0505-158 nimadm: WARNING, unexpected result from the fuser command.
umount: 0506-347 Cannot find anything to unmount.
forced unmount of/nimclient6109_alt/alt_inst/usr
forced unmount of/nimclient6109_alt/alt_inst/tmp
forced unmount of /nimclient6109_alt/alt_inst/opt
umount: 0506-347 Cannot find anything to unmount.
forced unmount of /nimclient6109_alt/alt_inst/home
forced unmount of /nimclient6109_alt/alt_inst/admin
forced unmount of /nimclient6109_alt/alt_inst
0505-158 nimadm: WARNING, unexpected result from the umount command.
0505-192 nimadm: WARNING, cleanup may not have completed successfully.
A file or directory in the path name does not exist.
0

Unix OS

32K

Solutions

23

Articles & Videos

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.