Unix OS





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


  compiling xerces on solaris box.
  /usr/lib/sparcv9/ and /usr/lib/64 have libicu*54.  
  In another location, /icu_needs_to_build_with/libicu*44.
  Whenver I compile, it's always picking libicu*54 version. I do want to build xerces with libicu*44 libraries.
  Do we have any flags like LDFLAGS or xyz to configure specific version shared libs?
OWASP: Threats Fundamentals
LVL 13
OWASP: Threats Fundamentals

Learn the top ten threats that are present in modern web-application development and how to protect your business from them.

how to extend root-vg.
I have 100 extra gig on my root-vg how ro add to volumne
We have a Sparc Enterprise M3000 which had a disk out a while ago. An Oracle engineer came out & replaced it.

We noticed today that the same slot has a solid green light. I ran a df -k and got the following results -

Filesystem                   kbytes           used            avail              capacity          Mounted on
/dev/md/dsk/d10       68158426    13480606   53996236     20%                 /
/devices                        0                    0                  0                     0%                 /devices
ctfs                                0                    0                  0                      0%                 /system/contract
proc                              0                    0                  0                      0%                 /proc
mnttab                         0                     0                 0                      0%                 /etc/mnttab
swap                            9544856        1768          9543088          1%                /etc/svc/volatile
objfs                              0                    0                   0                    0%                /system/object
sharefs                         0                    0                   0                    0%              /etc/dfs/sharetab
fd                                   0                    0                   0                    0%              /dev/fd
/dev/md/dsk/d30       4135998       3915557      179082        96%          …
Hi expert

How to find the latest patching and before patching in Centos OS 7, is this the correct i have try look into the "grep Updated: /var/log/yum.log | tail -30" to look for the latest.

what is the command to look for , before patching in Centos OS 7.

The customer complains a slowness in the transactions, from the analysis of the following output
you can understand if you need to change some configuration parameter ?

[root@MdapEtlA01 /] $ mmdiag --stats

=== mmdiag: stats ===
Global resources:
  OpenFile counts: total created 256020 (in use 256000, free 20)
    using 552000K memory
    cached 256000, currently open 4918+172, cache limit 256000 (min 10, max 256000), eff limit 256000
    stats: steals 179591029 (clean 179531269, dirty 59760)
  StatCache counts: total created 256007 (in use 256000, free 7)
    using 78000K memory
    cache limit 256000
    stats: inserts 179766566 steals 157897245 hits 14489 expands 17496150 revokes 127 uses 11359975
  OpenInstance counts: total created 25607 (in use 18865, free 6742)
    using 10316K memory
  BufferDesc counts: total created 118726 (in use 117677, free 1049)
    using 11643K memory
    cached 117677 cache limit 786432 pseudo 31894 prefetch 516
  indBlockDesc counts: total created 206656 (in use 196663, free 9993)
    using 7811K memory
    cached 196663 cache limit 256000 pseudo 194377

My verison of gpfs :

[root@MdapEtlA01 /] $ lslpp -L 'gpfs*'
  Fileset                      Level  State  Type  Description (Uninstaller)
  gpfs.base           C     F    GPFS File Manager
  gpfs.docs.data       C     F    GPFS Server …
I connected to the vios  an "integrated multifunction card with copper sfp" , now I would like to create an adapter to associate a usb port to the lpar, how should I do?

System Model: IBM,9179-MHC

by vios :
# lsdev | grep Multifunction
ent44      Available 0J-00       Int Multifunction Card w/ Copper SFP+ 10GbE (a219100714100a04)
ent45      Available 0J-01       Int Multifunction Card w/ Copper SFP+ 10GbE (a219100714100a04)
ent46      Available 0J-04       Int Multifunction Card w/ Base-TX 10/100/1000 1GbE (a21910071410d203)
ent47      Available 0J-05       Int Multifunction Card w/ Base-TX 10/100/1000 1GbE (a21910071410d203)
# lslpp -l | grep usb
  devices.usbif.010100.rte  COMMITTED  USB Audio Device Driver
  devices.usbif.030101.rte  COMMITTED  USB Keyboard Client Driver
  devices.usbif.030102.rte  COMMITTED  USB Mouse Client Driver
  devices.usbif.080400.diag  COMMITTED  USB Diskette Diagnostics
  devices.usbif.080400.rte  COMMITTED  USB Diskette Client Driver
  devices.usbif.010100.rte  COMMITTED  USB Audio Device Driver
  devices.usbif.030101.rte  COMMITTED  USB Keyboard Client Driver
  devices.usbif.030102.rte  COMMITTED  USB Mouse Client Driver
grep "testing" 789.log

zgrep "testing"  123.gz

i like to redirect above production server output to
abc/def/test.txt file which is on some other system test server where i have access

how to do it
grep "testing" 789.log >> abc/def/test.txt
above gives error no such directory as that directory is not there in production server

grep "testing" 789.log
how above different from
grep -C2 "testing" 789.log

i see below time stamp lines came 3 of them when i use -C2
2019-Jan-17 04:50:51.198 EST

i see below time stamp lines came 3 of them when i did not use -C2
2019-Jan-17 04:50:51.198 EST

please advise
when i do ls -ltr i see bunch of .gz files says 123.gz and 456.gz
and bunch of no gz files say 789.log etc

how to grep on say "testing" on both zip gz files and non zip files

grep "testing" 789.log

zgrep "testing"  123.gz

not sure how to combine above two together

also how search today log between 10 am to 11 am for that "testing" word in log?
please advise
Hi Expert,

If there anyone working on Oracle Retail V16 SaaS Interface here,
Cloud anyone please guide how to prevent Duplicate file processing to SaaS using PL/SQL or UNIX?

Thank You!

Need a unix script to loop through thousands of folders and write a file listing the folders that contain less than x amount of subfolders.

Thank you.
Bootstrap 4: Exploring New Features
LVL 13
Bootstrap 4: Exploring New Features

Learn how to use and navigate the new features included in Bootstrap 4, the most popular HTML, CSS, and JavaScript framework for developing responsive, mobile-first websites.

Dear Experts, I'm testing Oracle 11g on Centos 7 64b.

I installed Oracle but could not connect to the globalDB by sqlplus, it keeps showing error: ORA-12514: TNS:listener does not currently know of service requested in connect even I start the Oracle Database

I also attached the response file from Installation process. These are the details of listener and tnsname files:

lsnrctl status:

Can you please help? Many thanks!
What's the best way to monitor for UDP syslog traffic coming in from a redhat 4 and redhat 5 syslog clients if it's not arriving at the syslog server. The syslog server is running on a Redhat 6 server. netstat -taulpe | grep syslog is showing that UDP is listening on all IP's on the server but I'd like to see if there is any other way apart from running  tcpdump -i <nic> port 514. Would watch lsof -a -i:514 show it?
How to separate out a text file having the following format  on to another text file ?  | skjahdkjhhadjhahdahkahdhajkdhajkhjdkhakjhdjkahjdhajkhdjkahjkddddddddddddddddddhakkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkddshajhd  |dsjhdjhjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
 *ashadjahddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddda | xcnbxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxzczc

I would like to have
1) skjahdkjhhadjhahdahkahdhajkdhajkhjdkhakjhdjkahjdhajkhdjkahjkddddddddddddddddddhakkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkddshajhd
2) dsjhdjhjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj

I have a problem  with a server P780 with HMC,  when i launch a save of anything LPAR profile the process go in hanging.

Do you have an idea about what the problem is? On other servers seen from the same console I have no problems
I started with asking what the different is between "mode" and "flag", see: https://www.experts-exchange.com/questions/29122213/What-is-the-difference-between-mode-and-flag.html

However, I see that people are using different definitions for a flag. So it's better to start with the question: what is the definition of a flag? I'm not asking for general definitions, or your own definition, but specifically use the definitions in this post (and if necessary correct them and tell me what's wrong about the existing definition).

See: https://techterms.com/definition/flag

In computer science, a flag is a value that acts as a signal for a function or process. The value of the flag is used to determine the next step of a program. Flags are often binary flags, which contain a boolean value (true or false). However, not all flags are binary, meaning they can store a range of values.

Let's start with:

a flag is a value

So apparently, according to this definition, a flag IS a value. So a flag can not be seen as something that be two different values (two different states).

The next sentence confirms that:

Flags are often binary flags, which contain a boolean value (true or false).

Let's say we have c++ std::bitset, but it's about 1 bit. Firstable, it's important to be aware of the difference between:

1. setting the flag
2. setting the bitset

The bitset can be 1 or 0  (in this case because we have one …
When it's about "flags", I've noticed that different people have different ideas of what a flag is. Some people start to talk about "bit set" when it's about flags. I think the problem lies with the underlaying definitions. It looks like things are not well defined. So for this question, forget about your own ideas/definitions of what a bit set is, just follow the definitions in this post (and change them if necessary). Also forget about flags, this post is specifically about "bitset". First let's start with some "definitions":

See: http://www.cplusplus.com/reference/bitset/bitset/ (std::bitset)

A bitset stores bits (elements with only two possible values: 0 or 1, true or false, ...).

And see: http://www.cplusplus.com/reference/bitset/bitset/set/ (std::bitset::set)

all bits (1)      
bitset& set();
single bit (2)      
bitset& set (size_t pos, bool val = true);

(1) all bits
Sets (to one) all bits in the bitset.
(2) single bit
Sets val as the value for the bit at position pos.

I understand this. But now first let's start at the beginning and let's define a "bit". Let's define it like this:

A bit is an element of two possible binary values: either 0 or 1.

So let's see a bit as a box that contains a ball or a box that doesn't contain a ball. Now let's take a look at a bitset that represents the number 4:

|0     | 0     |  1     |
|0*2^0 | 0*2^1 |  1*2^2 |
3 boxes: 
Box 1: no ball
Box 2: no ball
Box 3: ball

Open in new window

In short, I would say:

A flag is a predefined bit or bit sequence that holds a binary value.

A mode is a distinct setting.

So it's not always possible to replace the term "mode" by "flag". This is only possible if it's about a binary value. I got confused by these terms when reading:


The argument flags must include one of the following access modes:

The file creation flags are O_CLOEXEC,

The file status flags are all of the remaining flags listed

Why they just don't say:

The file access flags are O_RDONLY, O_WRONLY, and O_RDWR.

Why they suddenly use a different term when it's about "access"? Probably behind the scenes it's also just about a binary value, right? Probably all O_VARIABLE's above are 0 or 1.

And see: https://en.wikipedia.org/wiki/File_descriptor

This table records the mode with which the file (or other resource) has been opened: for reading, writing, appending, and possibly other modes.

So Wikipedia uses the term "mode" only (and not flag). At least they are consistent, because they call them all "modes".

Is there a specific reason why sometimes mode is used and something flag (while it's about the same thing)? I would stay, be at least consistent to avoid confusion.
In reality, the "open file table" is not really a table, but let's say we will see it as a table. Which columns does this table have?

For example, see: https://cseweb.ucsd.edu/classes/sp16/cse120-a/applications/ln/lecture15.html

The open file table contains several pieces of information about each file:

the current offset (the next position to be accessed in the file)
a reference count (we'll explain below in the section about fork())
the file mode (permissions),
the flags passed into the open() (read-only, write-only, create, &c),
a pointer to an in-RAM version of the inode (a slightly light-weight version of the inode for each open file is kept in RAM -- others are on disk), and a structure that contains pointers to all of the .
A pointer to the structure containing pointers to the functions that implement the behaviors like read(), write(), close(), lseek(), &c on the file system that contains this file. This is the same structure we looked at last week when we discussed the file system interface to I/O devices.

So according to this, I would say:

- offset
- reference count
- file mode (permission)
- the flags passed into the open() (read-only, write-only, create, &c),
- pointer to in-RAM inode
- pointer to "read(), write(), close(), lseek(), &c".

But the file descriptor also points to the open file table, so we need another column that connects the "file descriptor table" with the "open file table". So I would add a column like:
By default, the first three rows of a "file descriptor table" consists of:

FD 0 (standard input,  associated with keyboard)
FD 1 (standard output, associated with screen)
FD 2 (standard error,  associated with screen)

Open in new window

These file descriptors point to one or more rows in the "open file table". Imagine we only have these three file descriptors. Then how does the "open file table" look like?

Usually all three file descriptors point to the same file, but that doesn't mean they point to the same entry in the "open file table". So how the open file table looks like?

_ | offset | reference count | permissions | flags | pointers
_ |    ?   |        ?        |      ?      |   ?
possible more rows

Open in new window

The lsof command shows for example:

lsof        721    root    0u      CHR              136,1       0t0          4 /dev/pts/1
lsof        721    root    1u      CHR              136,1       0t0          4 /dev/pts/1
lsof        721    root    2u      CHR              136,1       0t0          4 /dev/pts/1

Open in new window

The file "/dev/pts/1" is CHR (character special file). They all point to the same file.
I'm also wondering why it's for example "0u" and not "0r"? The file descriptor 0 stands for input, so it only has to read something.

r for read access;
w for write access;
u for read and write access;

Open in new window

I would expect something like: 0r, 1w, 2w instead of 0u, 1u, 2u? And what are the offsets et cetera?
Rowby Goren Makes an Impact on Screen and Online
LVL 13
Rowby Goren Makes an Impact on Screen and Online

Learn about longtime user Rowby Goren and his great contributions to the site. We explore his method for posing questions that are likely to yield a solution, and take a look at how his career transformed from a Hollywood writer to a website entrepreneur.

On IBM AIX 5L system. I have a Lexmark 2580-100 dot matrix printer, with a D-Link 10/100 Fast Ethernet Parallel Port Print Server (DP-301P+).Whenever the printer goes off, The IBM lpstat command shows the printer in a "DEV_WAIT" status.  I sent it a test print,  lpstat | lp -dprth and nothing.  I looked at lpstat and the printer only had the test in the Queue and was in a wait status.I tried disable/enable commands turning the printer off, the D-Link Off. Nothing using every combination of on/off sequences.  So I added the printer to a nearby PC, and sent a print job via windows to the IP address and it works fine.

Then I restarted the IBM.  The test print was in the queue and still DEV_WAIT.  I deleted it from the queue and went home. The system restarts itself at 4AM.  When I came in the printer was working fine. I think the file /var/spool/lpd/stat/s.prth.lp7 has something to do with it. The printer is lp7  the queue is prth.  There has to be a way to force the IBM to restart the print queue without deleting all pending print jobs.  I know it has something to do with the status file in the var->spool->lpd->stat folder.
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 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! I can't find what is doing this or how to make the change back to the "real" ip permanent.

Any suggestions.
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
See: https://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewritecond

Is symbolic link, bash convention.
See -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.

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.
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

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

Unix OS





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.