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

If my rsyslog.conf is configured to write *.info *.warn *.kern and some others to /var/log/messages is there any way to identify the local6 *.info messages apart from the *kern and *.warn and others in  /var/log/messages? I've noticed sometimes that the messages contain kern and warn but not just sure what *.info are and if there's an easy way to identify them
I'd rather not have to configure /etc/rsyslog.conf to have another log file for just *.info if it can be avoided. If there's no other way then I might just have to do it but I'm curious what the local 6 information messages actually are.
0
Learn Ruby Fundamentals
LVL 12
Learn Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

How do you append the output value of a command  that is run plus the value of other variables to a log file in a bash script?
This is what I have just now

#!/bin/bash
host=$(hostname)
date=$(date '+%d%m%Y:%H%M)
log="installlogfile.txt"
runbinary  2>&1 | tee -a ${installlogfile.txt}  <- instead of this i want to be able to append also ${date} and ${host} to the installlogfile.txt but tee -a with multiple variables doesn't work. Any ideas on how to do this in bash would be much appreciated. If i echo or print the variables before i run the command there would be newline characters and I would like the output in the log file to be $(hostname) ${date} output from the command.
0
I have several Solaris systems at work all running SunOs 5.10, also known as Solaris 10.  My hardware team recently updated all of our Solaris-10 OS boxes, primarily to apply security updates.  We have a ton of bash shell scripts and now some scripts work on some Solaris machines, and some don't work on other Solaris machines.  Hardware team believes they applied the same updates to all of our Solaris boxes.  One of my smart team mates dug a little bit further and discovered different versions of bash running on the different machines.

How do I continue to run this problem down, i.e. during versions of bash running on various Solaris machines?  I need to have a lot of facts, details, etc. when I take this to my management team.  Our application is getting ready to go through major testing and the hope was to have multiple machines to test on.  Needless to say, we need to get this fixed ASAP, where all of our bash scripts work as they did prior to the Solaris update.

I understand there is:  $ echo $BASH_VERSION.  Need more than this.  Appreciate the help -thanks in advance.

Fast forward
0
hi i what to put comma delimeted when i do cat of file





cat filename*.out > filename.out



the file is like this

DB: eca1

Input truncated to 37 characters





NSN     INSTANCE   Unit Code

----------- --------- ----------

18-018-6113 ECA1    10582





DB: fsa1

Input truncated to 37 characters





NSN     INSTANCE   Unit Code

----------- --------- ----------

18-018-6113 FSA1    10622



i what file to be like this so i can put in excell



NSN           INSTANCE   Unit Code

18-018-6113 FSA1           10622

18-018-6113 ECA1         10582
0
how to compile 64 bit version of libperl.a from perl 5.28 source code on solaris.

Tried with -fPIC while configuring. But, no luck.
0
I must delete queue on WebSphere MQ - IBM ,
What are the commands to use on an AIX server?
0
What percent of business PC's are Windows?

I am considering a quick launch of my new business app with a Windows version. I need speed to market, and will follow up with other platforms.

So, I need to know an estimate of the percentage of Windows PC's versus Mac versus other.

Any data on that?

Sales are nice, but that is part of the story. I am most interested in seeing the likelihood a typical business person could run my Windows program.

Thanks.
0
how to find number of count in the unix logs for a grep search keyword say 'nullpointerexception on deviding 109418 with 0' please advise
0
Dear Experts,

On AIX I need to compare 2 files holding percentage space usage:

Format:

hn5691    :   /appli/oltb/apache/logs     72 %
hn5785    :   /appli/logs/REPORTING     38 %
...

If the percentage in the second file is 10% higher than in first file it should write that in a file (so that can be mailed).
Idea is to catch a looping process.

I'm not enough into awk to make it work, your help is appreciated.
I attach 2 files to work with.

Many thanks in advance.
W.
file2.txt
file1.txt
0
Hi, All.

I have an issue with IPTABLES rules. Here is below image shows my iptables rules. But i can not "telnet" port 2196. I've edited directly "/etc/sysconfig/selinux". And restarted iptables. Selinux disabled.

What am i doing wrong ?

0
Exploring ASP.NET Core: Fundamentals
LVL 12
Exploring ASP.NET Core: Fundamentals

Learn to build web apps and services, IoT apps, and mobile backends by covering the fundamentals of ASP.NET Core and  exploring the core foundations for app libraries.

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
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
At work I have a separate Unix password for unix systems. I reset my password
through a utility that gives me a temp password. Then I

sudo passwd

and change the password. I log out and log back in with the new password a few
seconds later. Success! But then a few hours later I try to log in with the new password
and it's no longer working and I have to go through the password reset process.

Anyone have a hunch what's going on?
0
I added this alias in my .bashrc file so it looks like this:

alias gh="grep \"hello world\" /folder/"

Open in new window


but when I type 'gh' into the command line I get the error:

> gh
bash: gh: command not found

Open in new window


Am I missing something?
0
i have files how can i get there size in gb
0
I created a script that will append a cron job if it's not in the crontab file, but the problem is the appended job will not work unless I edit the crontab file using crontab -e. Is there a way to refresh cron in AIX without killing the process?
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
Dear Gurus,
I am using a curl command to transfer files as shown below . The reason is it needs to be sent to a particular port to enable tokenizing.
curl -k -v -T /export/home/flex/sample_files/Test_account_20180610.csv https://starserver.com:4443/webdav/Test_account_20180610.csv

Open in new window


This works fine.
The problem is that now I need to automate it using a scheduler.. but the file name suffix which is a date stamp keeps changing everyday.
Is there a way where I can give a curl command which just takes the file name irrespective of timestamp and put it in the webdav folder.
Something like this:

curl -k -v -T /export/home/flex/sample_files/Test_account_*.csv https://starserver.com:4443/webdav/Test_account_*.csv

Open in new window


SO that in teh webdav folder, I am getting the tokenised file with the name as that in the original location.

Please advise.

Thankyou very much.
0
Hello experts,

I'm very new to linux.

I'm trying to run the following commands on my Ubuntu machine:

COPY ./package.json /data/web-app
WORKDIR /data/web-app

Can someone please show me how to run these commands?

Cheers

Carlton
0
Fundamentals of JavaScript
LVL 12
Fundamentals of JavaScript

Learn the fundamentals of the popular programming language JavaScript so that you can explore the realm of web development.

Unfortunately it is not clear to me how I can do it for change for client  the storage pool where data is stored,

What are the commands to be applied to tsm?

With upd copygroup give me this error :

tsm: TSM_7.1>upd copygroup SAP_PD ACTIVE PGT_DAI STANDARD Type=Archive destination=VCC_PRO_NEW
Session established with server TSM_7.1: AIX
  Server Version 7, Release 1, Level 1.100
  Server date/time: 06/05/18   16:13:12  Last access: 06/05/18   15:28:47

ANR1585E UPDATE COPYGROUP: Policy set ACTIVE cannot be modified.
ANS8001I Return code 3.

my policy

tsm: TSM_7.1>query policyset

Policy        Policy        Default       Description
Domain        Set Name      Mgmt
Name                        Class
                            Name
---------     ---------     ---------     ------------------------
SAP_PD        ACTIVE        SAP_MC        Policy set per ambiente
                                           SAP
SAP_PD        SAP_PS        SAP_MC        Policy set per ambiente
                                           SAP
0
i add my group domain in /etc/sudores file is not working
i say
sudo visudo
 and in this file after the line
%sudo   ALL=(ALL:ALL) ALL
%mydomain\\unixadmins ALL=(ALL:ALL) ALL

save file and check from /etc/sudores and it's ok.
i login as domain user to ubuntu and try to create a directory under /mnt

error:
username@domain.local is not in the sudoers file.  This incident will be reported.
0
i try to mount synology nas drev on ubuntu but in different ip rang
nas has nfs support and permission
i say
sudo mont 12.11.1.5/volume1/backup /mnt/backup/

my ubuntu har 12.10.1.8
i get connection timeout
amd with smb connection
sudo mount -t  cifs //12.11.1.5/volume1/backup /mnt/backup user=Administrator
get mount error(115) Operation now in progress
0
On tivoli tsm I need to create a new storage pool which will point all my nodes
What operations should I do?
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 for errors, write all messages to a log file (sas_program.log), and also execute another script (script2.sh) which has a few directory logicals/variables shortcuts.

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

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

#script1.sh

#!/bin/bash

#executing script2.sh script 
source script2.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

#Setting stat variable for future use
stat=0

#executing SAS program, checking for errors, and writing all messages to a log file 
sas ${PROGDIR1}/program1.sas -log ${DATADIR3}program1.log
stat=$?
   if [[ "$stat" !=0 ]]; 
     then echo -e "--- Error: Abnormal end in program program1.sas. Check log file! ---" >> $plog
    exit 2
             echo -e "--- Program1.sas run successfully! ---" >> $plog
   fi
exit 0

Open in new window




Any suggestions would be appreciated!
Thank you!
0
hi,

Did you all experienced any kind of DB2 file corruption on unix/linux OS?
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.