Search Results

Search: Posts Made By: Khanaza
991
Posted By Khanaza
Logs for the services in redhat
I need find the details of the services like iptables start /stop time in redhat. I checked in the /var/log/messages but could not find any entries for the same.
How can I find the start/stop...
3,558
Posted By Khanaza
it automatically allocates the next available id...
it automatically allocates the next available id to the newly created process, if however some users are deleted and their id is free, it will allocate that
2,118
Posted By Khanaza
Strange ,I am getting below $cat a abc def...
Strange ,I am getting below

$cat a
abc def 1 xyz zzz
bca cde 2 yyy xxx
$sed -e 's/\(.*\)\([[:digit:]]\)\(.*\)/\1\|\2\3/' a
abc def |1 xyz zzz
bca cde |2 yyy xxx
$
1,168
Posted By Khanaza
check SSH
check SSH
2,118
Posted By Khanaza
try This : sed -e...
try This :

sed -e 's/\(.*\)\([[:digit:]]\)\(.*\)/\1\|\2\3/' file
6,626
Posted By Khanaza
Check this ,it may help you awk ...
Check this ,it may help you
awk 'BEGIN{RS="----------------"}/John/{print;getline;print}' file
3,728
Posted By Khanaza
$sed...
$sed 's/|\([[:alnum:]]\)/\1/g;s/\([[:alnum:]]\)|/\1/g' a
Life is Beautiful"|"Indeed life is beautiful too"|"But unix is fun is not"|"
$cat a
|Life is |Beautiful"|"Indeed life |is beautiful...
2,801
Posted By Khanaza
please check this , $cat a A X1 Y1 X2 Y2 X3...
please check this ,
$cat a
A X1 Y1 X2 Y2 X3 Y3
$awk '{ i=1 ; while (i< NF) {printf("%s ",$1);i++;printf("%s ",$i);i++;printf("%s\n",$i)} }' a
A X1 Y1
A X2 Y2
A X3 Y3
40,706
Posted By Khanaza
thanks Aia for pointing this out. the getline...
thanks Aia for pointing this out. the getline should present in the BEGIN block...
40,706
Posted By Khanaza
awk '{getline;print}' file[s]
awk '{getline;print}' file[s]
6,605
Posted By Khanaza
can u check this for process pid listing ps -eo...
can u check this for process pid listing ps -eo %mem,pid | sort -n -k 1 | grep -iv mem | tail -5 | awk '{ print $1 }'
2,138
Posted By Khanaza
cant you use like this cp /tmp/Safe\...
cant you use like this
cp /tmp/Safe\ Dirs/vault/file-02* /tmp/Safe\ Dirs/vault/02-February
1,554
Posted By Khanaza
where are you checking the process,the remote...
where are you checking the process,the remote server??
Just asking in avoid any silly mistakes
27,564
Posted By Khanaza
>ls /tmp/a 1 2 3 4 456 5 File File123 ...
>ls /tmp/a
1 2 3 4 456 5 File File123 File456 Filebc FileDEF
>ls /tmp/v
1 4 File123 File456 FileDEF
>cd /tmp/a
>ls `ls /tmp/v` 2>&1 | grep -iv 'cannot'
1
4
File123
File456...
1,476
Posted By Khanaza
Its just a variable ,added to take any other...
Its just a variable ,added to take any other input that may present in the file ,
like
#1043 asd #Here asd will go to junk
If you are sure you have only one word per line ,you can skip this.
1,476
Posted By Khanaza
You can use like below ,a is the file name >cat...
You can use like below ,a is the file name
>cat a
#1043
#677
>while read num junk ; do var=`echo ${num#\#}`; echo $var; done < a
1043
677
847
Posted By Khanaza
Use find, like cd directory while : do ...
Use find, like
cd directory
while :
do
FileChanged=`find . - mmin -15 -print |wc -l`
if [ $FileChanged -eq 0]
then
cat * >input/mergefiles_`date +%s`
fi
Sleep 15
done
1,266
Posted By Khanaza
Welcome, sorry for the multiple post, i am using...
Welcome, sorry for the multiple post, i am using mobile to post it, have a nice day
1,266
Posted By Khanaza
I=1 for t in `cat out.txt` echo "create...
I=1
for t in `cat out.txt`
echo "create directory data_$i as" '"$t"' :"
i=`expr $i + 1`
done

---------- Post updated at 07:03 PM ---------- Previous update was at 07:02 PM ----------

The...
1,679
Posted By Khanaza
Can you please elaborate what exactly is your...
Can you please elaborate what exactly is your requirement here
5,080
Posted By Khanaza
You can also use basename and the dirname to get...
You can also use basename and the dirname to get the output
basename /tmp/abc.txt will give abc.txt
dirname /tmp/abc.txt will give /tmp
7,852
Posted By Khanaza
Use \n in the echo statement
Use \n in the echo statement
Showing results 1 to 22 of 22

 
All times are GMT -4. The time now is 01:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy