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

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
CompTIA Security+
LVL 12
CompTIA Security+

Learn the essential functions of CompTIA Security+, which establishes the core knowledge required of any cybersecurity role and leads professionals into intermediate-level cybersecurity jobs.

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
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
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
Starting with Angular 5
LVL 12
Starting with Angular 5

Learn the essential features and functions of the popular JavaScript framework for building mobile, desktop and web applications.

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
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
CompTIA Network+
LVL 12
CompTIA Network+

Prepare for the CompTIA Network+ exam by learning how to troubleshoot, configure, and manage both wired and wireless networks.

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
Dear Wizards, which one is the best open-source software for log management?

I'm doing a research about Octopussy and Greylog, but not sure which one is better. Does anyone have experience about this?

Many thanks!
0
what is the meaning of below command

zgrep 'CUSTOMERPASS' abcd.20180719.gz|grep -v 'Trials: 1'|less



Is there is single link, tutorial or video tutorial where i can find above kind of command
and
count command

more
less
grep
etc.

alll commonly used commands like above
why we need | before less?

Please advise
0
server times out

i have 15 production unix server instances to check logs same time

when i am on one monitor other monitor times out in every 15 minutes

if i type
tail -f logfile


does it still times out on me

i cannot change time out setting myself

just looking for some work around so that i do not have to enter username and password all over again
0
transactions search in unix logs


in the unix logs of transactions each transaction has bunch of values like

transaction_id|transaction_time|transaction_description|transaction_type| ......etc



if i want to display only the transactions that took more than say 30 minutes and whose transaction_type is "sell"

how do i frame my grep command for that

any sample queries, links, resources, sample video tutorials on this

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

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.