Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: drysdalk
Forum: AIX 07-23-2019
13,299
Posted By bakunin
Basically you have three types of memory in an...
Basically you have three types of memory in an AIX system: "used" and "unused" and the "used" category divides into two parts: "computational" and "file" memory.

"unused" is memory the kernel has...
6,255
Posted By Don Cragun
Note that using: find /path/to/files -type f...
Note that using:
find /path/to/files -type f -newermt 2017-01-01 \! -newermt 2018-01-01 -exec rm -fv \{\} \;
will invoke the rm utility once for each of the 200K files you want to remove. That is...
12,601
Posted By MadeInGermany
[Tip] How to display the logged-in users
In a professional environment with traditional application you often want (or are asked) to report the users.
Traditionally there is the who command
who | awk '{print $1}'telnetd or sshd register...
2,150
Posted By bakunin
In principle: yes. You can change this behavior...
In principle: yes. You can change this behavior to some extent by setting kernel tuning parameters but for most purposes the default behavior does quite OK so that this is not necessary. Here, for...
Forum: What is on Your Mind? 09-29-2017
4,909
Posted By bakunin
i work with AIX, therefore my clients are always...
i work with AIX, therefore my clients are always big companies (mostly banks) with big datacentres. I have none of these fancy certifications*) but i have a project record going back more than 30...
1,016
Posted By Corona688
Well, you do, if you want to compare it more than...
Well, you do, if you want to compare it more than once, since $? is overwritten every time you execute a program or statement.

This is an ideal place to use a case statement though:

case "$?"...
Forum: Red Hat 04-06-2017
804
Posted By Scrutinizer
Likewise, you could try this modification of...
Likewise, you could try this modification of drysdalk's suggestion:
ssh <hostname> || date
Which would only print the date if ssh ends with an error condition.
911
Posted By rbatte1
An alternative to remove an if ... then .... else...
An alternative to remove an if ... then .... else ... fi section:-while true
do
if [[ -s file.txt ]]; then
### here im mailing content of file.txt
abend=1...
Forum: SuSE 03-25-2017
10,392
Posted By jim mcnamara
ld or ldd? I think ldd might be more useful to...
ld or ldd? I think ldd might be more useful to list expected shared library versions.
693
Posted By bakunin
Use grep -f: instead of writing a shell loop grep...
Use grep -f: instead of writing a shell loop grep can do it in one step (and presumably quite faster):

grep -f new_phone master > in_new_phone_and_master

You might want to try this with some...
9,749
Posted By Chubler_XL
@drysdalk Your solution is functional but...
@drysdalk

Your solution is functional but can I make a few suggestions to help improve it.

file_string=`/bin/cat date.txt | /usr/bin/awk '{print $5,$4,$7,$6,$8}'`

1. Awk can open an read...
2,580
Posted By Don Cragun
Note that several short cuts can be used to speed...
Note that several short cuts can be used to speed up the above script and reduce chances for failures due to system limits on the size of argument lists allowed when execing a file...

The command:...
Forum: Red Hat 02-10-2017
3,425
Posted By Corona688
Interesting suggestion. awk is a lot more...
Interesting suggestion. awk is a lot more functional than cut fyi, you can replace all the kitchen | sink | commands with one awk. zcat file.gz | awk '{ gsub(/[\(\)]/, ""); print $2 ; exit }'
Showing results 1 to 13 of 13

 

Featured Tech Videos

All times are GMT -4. The time now is 11:34 PM.
Unix & Linux Forums Content Copyright 1993-2021. All Rights Reserved.
Privacy Policy