Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [aix]

AIX (Advanced Interactive eXecutive, pronounced "a i ex") is a series of proprietary Unix operating systems developed and sold by IBM for several of its computer platforms.

0
votes
0answers
32 views

Completely Clear command prompt through bash

I am actually making a menu for my official server. I made it through bash scripting on AIX. The problem i am facing is that when script is running, user can scroll up and see history of all commands ...
2
votes
1answer
351 views

How can I get files using find command

How to use find command to get only files from the current directory (excluding subdirectories and its files) older than a day on AIX?
0
votes
0answers
14 views

pssh multiple server execute command as root

I try to use pssh to execute command on multiplate server. And I have error [5] 14:38:01 [FAILURE] xcasw2828102sj Exited with error code 126 sh: /bin/chpasswd: 0403-006 Execute permission denied. ...
1
vote
1answer
20 views

IF statement AIX (Korn Shell Script)

I've made a script which collects info. One of the things it does is checking if a file or directory exists. If yes, it copies it to the /tmp directory. The script fails with 0403-057 Syntax ...
2
votes
0answers
33 views

'Out of Memory' on AIX installing Perl Module [closed]

Getting out of memory error trying to install NetFTPSSL perl module on IBM P750 running AIX 7.1 with 76GB of memory. root@polarprod-cip(/)# perl -MCPAN -d -e 'install Net::FTPSSL' Loading DB ...
2
votes
0answers
37 views

AIX : NOFOLLOW_LINKS is not supported on this platform

I have an AIX 7.2 machine. I am trying to run a Java program on it. It gives me this error: NOFOLLOW_LINKS is not supported on this platform. It is because I am using this call in the program: Files....
0
votes
1answer
21 views

AIX process stack watermark

Does exist any tool/command for checking the maximum that a process stack has used? I need that to tune the stack size configuration for a program.
0
votes
2answers
67 views

How could I know inside a script if stdout has been redirected for it?

I have a script in ksh; depending whether there is a redirection from the command line, I redirect the output via a exec 1>file. How can I test from inside the script itself if the command calling ...
0
votes
0answers
21 views

Over-allocation of memory in AIX/UNIX

Just finished my research regarding over-allocation's negative impact to VMs (Wintel). Over-allocation - usage is 2vCPU | allocated is 32vCPU I have not found any link regarding any negative impact ...
3
votes
2answers
72 views

A Unix AIX variable without a $ symbol?

I'm trying to debug an existing program and found an if condition without $ symbol prefixed to it. Values are: dt_val=1234 prev_dt_val=1234 If condition goes like: if [ dt_val -eq prev_dt_val ] ...
1
vote
1answer
36 views

kornShell and AIX unable to create an Array Variable

LS=`ls "$SRC_PATH"/* | grep -i -v *.ignore` I cannot use for loop as I need to check conditions with while as there are multiple conditions. Trying to access the content using ${LS[$CNT]} CNT=`...
2
votes
3answers
47 views

print all 3-character-sub-directories using shell script in AIX

In my system, there is a /Test directory under which many directories are available. I want to print all directories with 3-character-name, in AIX system. I got code for Gnu/Linux. find /test -...
1
vote
0answers
106 views

Get/Set environment variables in a different tty

I'm using a tool (Autokey) that spawns in a new shell. Cool tool, but I want to pull info from my current shell. Say I'm on pts/0 and I have a variable set: VAR1=yes. In another shell, I want to be ...
1
vote
0answers
19 views

AIX 6.1 versus AIX 7.1 strange behaviour [duplicate]

I have this logic in a ksh script on AIX 6.1 and it works fine. integer loop_count=0 integer sleep_interval=5 integer alarm_interval=60 if (( $loop_count*$sleep_interval%$alarm_interval -eq 0 )) then ...
0
votes
2answers
57 views

Extracting part of string from a file in ksh environment

I have a file that has error messages as per below rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1505) rsync error: error in rsync protocol data ...
-1
votes
2answers
60 views

How to find files containing set of words on linux [closed]

I have number of text files line fruit1, fruit2, fruit3, fruit4 and so on in one directory. Now I want to find the files which contains all three words "Appale" , "Banana" & "Orange". All three ...
3
votes
1answer
170 views

grep: Not a recognized flag: o

I am trying to extract the date and timestamps from my log file string ($Data in the below code) on AIX using a regex and loading it into a text file as below: Data="Logs/2018-12-03/log.txt:3:2018-12-...
-1
votes
2answers
523 views

how to grep a value stored in a variable [closed]

i am writing a bash script in which i am storing current date in a variable and then i am greping that variable . issue is its not working currentdate= $(date +%b\ %d) echo "$currentdate" last |grep ...
0
votes
1answer
34 views

In Linux, how can I set a Function globally

In AIX, I have a, FPATH set function, which is globally accessible by just calling the function name. I am trying to replicate this functionality in Linux. I set the function in $PATH variable, I ...
0
votes
1answer
194 views

How to download https file in AIX without wget and curl? [duplicate]

In an UNIX environment running AIX where I'm a not privileged user (without sudo) if I need to download a file from HTTPS server and there is no wget or curl... How I do it? Is there any replacement ...
0
votes
1answer
34 views

Test for network connectivity from various hosts to one specific host via ssh and telnet

I am trying to see if a port is opened for a list of hostnames/IP's, and I used a simple script like this one to ssh to each host and capture the output. for i in `cat $1` do ssh $i "sleep 5 | telnet ...
2
votes
1answer
252 views

Alternatives to cURL/wget for remote API calls

I'm on IBM AIX 7.1 where cURL and wget are not available. Also, I'm not in a position to install either. Are there alternatives that would be available that would enable remote API calls using GET/...
0
votes
2answers
30 views

Replace @@@ and NotApplicable string and redirect output to other file? [duplicate]

I'm using IBM AIX which doesn't have much support like sed -i and sed with \t is not working in my case. I would like to replace replace NotApplicable string with a single space ' ' then replace @@@ ...
1
vote
1answer
87 views

Align columns evenly without “column - t”

I have an output file created from a Korn shell script. I need to align the output with spaces evenly. Unfortunately column -t is not available on AIX. Actual File: X1vir1000 x1-DFB127 ...
0
votes
1answer
67 views

How can I adapt this bash progress bar function for AIX ksh88? [closed]

I have a bash script for progress bar and I use it when I work in bash: #!/bin/bash prog() { local w=80 p=$1; shift printf -v pt "%*s" "$(( $p*$w/100 ))" "";pt=${pt// /.}; printf "\r\e[...
0
votes
1answer
88 views

I need to replace a string in html sed is not working

Here is the code in the shell script I have used sed 's/xyxx/$date1/' /u001/Scripts/abc.html > /u001/Scripts/abc.html The code is trying to print HTML tags inside AWK command nawk 'BEGIN{ ...
1
vote
0answers
24 views

Change errpt logs language for AIX systems

I have AIX 6.X and 7.X systems installed having FR as the default language; as expected, the errpt command's output is in FR. Is there a way I can generate the errpt logs in EN without changing its ...
1
vote
2answers
40 views

Grep multiple lines with different patterns [closed]

I have this test.debug file in AIX unix with the following fields: in[ 2: ]<0000********0000> in[ 3: ]<0> in[ 4: ]<000000020000> in[ 7: ]<1113> in[ 7: ]<80402&...
0
votes
1answer
174 views

Read only access to directory for specific users on AIX box

We are having user1 and user2 in AIX server (7100-04-05) and we need to give readonly access to path /data/web/tmp/* (they need to be able to read contents of files). With AIXC access list we can give ...
1
vote
2answers
222 views

Concatenate a string with a variable in grep command

I have to search by this pattern: _20181106 20181106 is yesterdays date, so it has to be be a variable like TZ=aaa24 date +%Y%m%d How can I search a file with this pattern? I'm working with AIX
1
vote
3answers
52 views

How to add a path before the first character of each line in a file.txt and save the same file with those edits? [duplicate]

I have a file that has some lines like: account_1 account_2 account_3 I have to add a path like /home/info/ before each line and save the same file with those updates like this: /home/info/...
1
vote
1answer
49 views

What is the easiest way to grep the command output? [duplicate]

I a trying to grep for certain string after issuing the grpck -n ALL command so when trying grpck -n ALL | grep -i format, for example, I still see the whole output and not just the lines containing ...
0
votes
1answer
48 views

Use small script inside another On AIX, or a solution in a single command

I want put on a small script (perl-script.pl) inside another in order to use use it with a find command, like this: #Saving the previous permission information for a possible recovery. case "$STAND" ...
1
vote
1answer
127 views

How to use istat on AIX like stat on Linux distributions

In Linux, I use the following command to show this output: find /backup/$INSTANCE/tsm/* -exec echo '"{}" ' \; | xargs stat --printf "chown %U:%G '%n'\nchmod %a '%n'\n" >> /tmp/permissions.txt ...
1
vote
2answers
69 views

AIX Unix - How to Find and Remove files created between date period, with starting and ending characters?

I'm using IBM AIX Unix and it's limited with command option. I want to implement below filter criteria using find and mtime (which works) option. I would like to remove the files listed with below ...
1
vote
2answers
139 views

After an AIX mksysb NIM migration upgrade, virtual package AIX-rpm is out-of-sync with the OS level

After upgrading an AIX system using mksysb migration via NIM, the AIX-rpm virtual package was left behind at the previous AIX level: $ oslevel -r 7100-04 $ rpm -q AIX-rpm AIX-rpm-6.1.7.0-7 This ...
1
vote
1answer
16 views

setting a remote stdout into local KORNSHELL variable

I'm writing a script. The idea is to compare MD5 checksums between a local file and a remote one. The local file checksum is saved into a local variable: LOCALMD5=!chsum "$(basename "$file")" I ...
1
vote
1answer
205 views

Using korn shell to compare local and remote MD5 over sftp

I am in need of creating and checking checksums between a local file, and the remote file I just pushed. If the MD5 checks, continue, else break. This needs to be in KORN shell scripting because we ...
-1
votes
1answer
20 views

How can I get a count of a Word called 'MSH' used multiple times in a file with a single UNIX command - AIX 6.1?

How can I get a count of a Word called MSH used multiple times in a file with a single UNIX command - AIX 6.1 ?
1
vote
1answer
36 views

Creating empty copies of files with new extensions

I have AIX 7.1. Let's say I have a directory with files like these: 1.txt lala.csv I need to create empty copies of these files with a new extension in the same directory, like so: 1.txt.done lala....
1
vote
0answers
43 views

AIX auditpr timestamp format

Is there a way to customize the timestamp format that the auditpr command on AIX generates? I am logging to binary, and when I use auditpr to read the binary audit logs, I get something similar to : ...
0
votes
1answer
300 views

How to pinpoint what process uses the disk using NMON on AIX

On an AIX 7.2 machine I need to investigate what is causing daily slowdowns between certain hours, and after analyzing the .nmon files using the nmon analyzer excel I've found that indeed the Disk ...
-1
votes
2answers
41 views

reestablish root shell

I disabled the shell of user root with the command chuser shell=/bin/false root and now I cannot switch to root with sudo su -. PermitRootLogin is disabled too, so I don’t know how could I reestablish ...
2
votes
2answers
578 views

Removing characters with sed [duplicate]

I am working on AIX unix and trying to remove non-printable characters from file the data looks like Caucasian male lives in Arizona w/ fiancÃÂÃÂÃÂÃÂÃÂ in file when I view in Notepad++ using UTF-8 ...
0
votes
1answer
17 views

TCB Enabled During Upgrade

I'm pretty sure I know the answer to this, but I wouldn't be doing my due diligence if I didn't ask: I know that you can only enable TCB in AIX during install, but what about during an upgrade? Can ...
5
votes
0answers
59 views

Random errors thrown by Bash shell: cannot open named pipe [duplicate]

I have found that keeping a detailed log of every command I run, from which path I ran it from and which user I sudo'd from, is extremely valuable as the years go by and I'm trying to remember what I ...
0
votes
1answer
35 views

AIX Does not support bc boolean expression [duplicate]

I ran into an issue where bc does not have boolean expressions in the AIX system. Wondering if there is a replacement command so I don't have make my code any longer? This is in a bash script. Here ...
3
votes
1answer
54 views

chfs does not work in a login ksh shell [closed]

I can't find a reason why chfs command fails in ksh (I open ssh sesion with putty). But when I run ksh or ksh93 in the shell again then it works. Any clues? # alias|grep chfs # type chfs chfs is /...
0
votes
2answers
378 views

change date/time format from yyyymmddHHMMss to dd/mm/yyyy HH:MM:ss

How do I change date/time format from yyyymmddHHMMss to dd/mm/yyyy HH:MM:ss which is displayed as an output (eg. JOBNAME1 STARTED AT 20180904152402) from a command... grep JOBNAME1 | sed -e s/|/ /...
0
votes
2answers
108 views

ttdbserver and inetd

If I disable ttdbserver service in an AIX server (I commented the line with # in /etc/inetd.conf): #ttdbserver sunrpc_tcp tcp wait root /usr/dt/bin/rpc.ttdbserver rpc.ttdbserver ...