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
C++ 11 Fundamentals
LVL 12
C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

how to grep multiple awks

$ awk '{print;}' employee.txt
100  Thomas  Manager    Sales       $5,000
200  Jason   Developer  Technology  $5,500
300  Sanjay  Sysadmin   Technology  $7,000
400  Nisha   Manager    Marketing   $9,500
500  Randy   DBA        Technology  $6,000


$ awk '{print $2,$5;}' employee.txt
Thomas $5,000
Jason $5,500
Sanjay $7,000
Nisha $9,500
Randy $6,000

in above query how to tweak to see  see all records whose name starts with 'S' and Salary greater than '6000'

also
in above query how to tweak to see  see all records whose name starts with 'S' and Salary greater than '6000' and Department Starts with  'T'


100  Thomas  Manager    Sales       $5,000     08/08/1988 6:00:01AM
200  Jason   Developer  Technology  $5,500 08/08/1989 7:00:02AM
300  Sanjay  Sysadmin   Technology  $7,000 08/08/1982 9:00:03AM
400  Nisha   Manager    Marketing   $9,500 08/08/1981 10:00:04AM
500  Randy   DBA        Technology  $6,000 08/08/1981 11:00:5AM
if it has joined date and time as above
in above query how to tweak to see  see all records whose name starts with 'S' and Salary greater than '6000' and Department Starts with  'T' and joined between particular date time to particular date time say  08/08/1982 9:00:03 AM till 08/08/1981 10:00:04AM
i need to use above in a zgrep command

https://www.thegeekstuff.com/2010/01/awk-introduction-tutorial-7-awk-print-examples/
0
This is an IBM p9 system with AIX 7.2. End user rebooted the system and it came up with the auto config (normally seen the first time you boot a system) on the console. Unfortunately they then selected auto config tcpip and it did, change ip address of ent0 to 0.0.0.0. After finding that I used smit to change it back to what it was supposed to be. However, now each time the system is reboot if always goes back to 0.0.0.0! I can't find what is doing this or how to make the change back to the "real" ip permanent.

Any suggestions.
0
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
awk query
 unzip -c  xyz.log.20180905.gz| awk '$0>= "2013-Sep-09 18:33" && $0 <="2013-Sep-09 23:15"'| grep '|[1-9][0-9][0-9][0-9][0-9]|0000'|wc -l
Zip file too big (greater than 4294959102 bytes)
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
how to learn awk any good video tutorials on it?
please advise
0
zgrep 'XYZ|AB|MASTER' AAAA.log.20180904.gz | grep '|[1-9][0-9][0-9][0-9][0-9]|0000' | wc -l

can you please advise what is the meaning of above zgrep command

where i can find, practice and learn above kind of commands

how grep and egrep are different

https://ryanstutorials.net/linuxtutorial/grep.php
how to learn regular expressions used in queries

Please advise
0
data no align after i do cat in unix this is my script
cat data*.txt|grep -v ^UNIT_CDE|awk '{print $1,",",$2,",",$3,","$4,",",$5,",",$6,",",$7,",",$8,",",$9,","$10,",",$11,",",$12,",",$13,",",$14,",",$15,","$16,",",$17,",",$18,",",$19,",",$20}' >>  mergetstneg.txt
catfileimg.jpg
0
See: https://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewritecond


-h
Is symbolic link, bash convention.
See -l.


-l
Is symbolic link.
Treats the TestString as a pathname and tests whether or not it exists, and is a symbolic link. May also use the bash convention of -L or -h if there's a possibility of confusion such as when using the -lt or -le tests.


-L
Is symbolic link, bash convention.
See -l

What are the differences between these three?

"-h" has "bash concention" and "-l" not. But what is the difference in practise? Can someone give me an example of the difference?

And why it's "-L" and not "-H"? "-L" is about the bash convention, but "-l" not. However, "-h" is. So then I would expect "-H" instead of "-L".

I don't need it for something right now, but I'm trying to understand the Apache documentation.
0
okay also the operating system of the rescue disk is Debian and that of Linux server is CentOS 5..I am very new to this so please forgive my
haphazard formulation of the problem.We were supposed to check and then recover the datasystem of a supposedly corrupted linux
server using the fsck command. Now here the problem comes we first ran the fsck commands and the answer was that those commands cannot
be run as the disks were in use. So we started unmounting the disks one by one till there was none left and then we again ran
fsck commands this time..But the command failed to do anything. Various attempts to remount the different drives also failed.
So our questions are three fold

1) How do we get all the drives back in original configuration
2) How do we properly run fsck commands to check and rebuild the corrupted drives
3) if the system logged out of rescue mode and is restarted in normal mode at this moment will we lose all the data that is stored in that server




first time running fsck, df, fdisk commands

rescue:~# fsck -A
fsck from util-linux 2.25.2


rescue:~# df
Filesystem     1K-blocks   Used Available Use% Mounted on
/dev/root         645056 559588     85468  87% /
devtmpfs         3959080      0   3959080   0% /dev
tmpfs            4070628      0   4070628   0% /dev/shm
tmpfs            4070628  17836   4052792   1% /run
tmpfs               5120      0      5120   0% /run/lock
tmpfs            4070628      0   4070628   0% 

Open in new window

0
hi am not able to type in my terminal its seemed locked and when the vm in locked am not able to type password am in solaris running in oracle vm
0
Become a Microsoft Certified Solutions Expert
LVL 12
Become a Microsoft Certified Solutions Expert

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

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
Hello community,

I want to know how can I do a user that only can run custom commands under Unix, especially under AIX 7.

For more clear understanding, I have an user that has custom commands that only that user can run. So, I need to add alternative user that can execute just some os system commands and the earlier user custom commands also and if the user try to execute other commands gives an error or an advice that they cannot execute those commands.

I hope have been clear. Please, help me.
Regards,
0
I have to migrate the FS GPFS (3.4) on AIX server on new NSD disks, under the current configuration.
Which replication procedure is best to use?

[root@crmcas01]/tmp# mmlsconfig
Configuration data for cluster TEST:
---------------------------------------------
myNodeConfigNumber 1
clusterName TEST
clusterId 13882357993337224079
autoload yes
minReleaseLevel 3.4.0.7
dmapiFileHandleSize 32
tiebreakerDisks tiebreaker01
worker1Threads 500
traceRecycle global
tracedevBufferSize 1048576
traceFileSize 300000000
trace all 4 tm 2 thread 1 mutex 1 vnode 5 ksvfs 2 klockl 2 io 3 pgalloc 1 mb 1 lock 2 fsck 3
pagepool 8G
nfsPrefetchStrategy 1
maxMBpS 2048
maxStatCache 256000
maxFilesToCache 64000
adminMode allToAll

File systems in cluster TEST:
--------------------------------------
/dev/SwReport
/dev/fsWBCp
/dev/fsCRMp
/dev/sbsiebCRMp
/dev/sbsiebgCRMp
0
I have to migrate an AIX 5300-12-05-1140 on SVC I can use the MIGRATEPV command using the following commands:

extendvg rootvg hdisk1
migratepv hdisk0 hdisk1
bosboot--ad /dev/hdisk1
bootlist-m normal hdisk1
reducevg rootvg  hisk0
0
I have setup the connection between an AIX Server and a Syslog Server. I configured the severity etc. It works fine.
Although, i would like to add some features like, logout or session lock (no only login messages are sent) and the most important is logging the executed commands!
Could you please help me?
0
I tried to configure snmpdv3.conf on AIX, but i didn't make it.
Does anyone have in mind step by step the configuration? I would like to connect AIX with a NMS, so i will just configure snmpv3 on AIX, i will add the user on NMS with the proper credentials. They should communicate, right?
Please help me or give me any link with the procedure step by step..
Thanks!
0
Hi,

I just setup Ubuntu and it's updated.

I also installed and setup Samba, shared a folder and set permissions.

From my Windows 7 Pro, I can access the shared folder I created in Ubuntu.  I can even change its content.

From Windows Server 2003, I can't.  I get the following error message:
Login unsuccessful.  ... Be sure your username and password are correct.

Can you please help me?

Thanks
0
I had this question after viewing send ksh history to syslogd on AIX.

Is there any easy way to send the history of executed commands of every user at a syslog server?
I set up syslog.conf to send the system logs, but i also need the send the history executed commands, the information of login and logout etc.

Could you please help me step by step with this? I m not that familiar... Thanks!
0
Hi,
On solaris-10 server, this file is missing, which is causing another issue. Can somebody guide, how to fix this ?
bash-3.2# ls -l /dev/kmem /dev/ksyms
lrwxrwxrwx   1 root     other         27 Jan 28  2011 /dev/kmem -> ../devices/pseudo/mm@0:kmem
lrwxrwxrwx   1 root     other         31 Jan 28  2011 /dev/ksyms -> ../devices/pseudo/ksyms@0:ksyms
bash-3.2# ls -l /devices/pseudo/mm@0:kmem /devices/pseudo/ksyms@0:ksyms
/devices/pseudo/ksyms@0:ksyms: No such file or directory
crw-r-----   1 root     sys       13,  1 Jan 28  2011 /devices/pseudo/mm@0:kmem
bash-3.2#

Open in new window

Thanks
0
CompTIA Cloud+
LVL 12
CompTIA Cloud+

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

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
I want to know how can I start a script at the system startup. I tried to make a sh file under /etc/rc.d/rc3.d/ but I rebooted the Os and it does not start my script as I want. :(.

Regards,
0
simple Shell script to start a tom cat server (JVM) and if for some reason if server does not start within 3 mins exit and  also find any hung jvm tomcat start commands fired and force kill it.
0
file create error on below site


https://www.tutorialspoint.com/execute_bash_online.php

please advise how to create some files and practice grep commands there

any other online free tools to practice unix.

please advise
fileCreate.png
0
Hi,


I have to update samba sun an AIX 7.1 TL 05 server, I currently have a version 3.6.25 and I want to bring it to a version samba-client-4.6.15-1.aix6.1.ppc.rpm downloaded from AIX Toolbox.
What operations should I do?
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

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.