Search found 589 matches

by azfar
Thu Feb 16, 2012 3:19 pm
Forum: Administration
Topic: how to copy larger 2GB files with samba share
Replies: 2
Views: 7529

Re: how to copy larger 2GB files with samba share

try to mount with lfs option

mount -t smbfs -o lfs //server/share
by azfar
Mon Feb 13, 2012 9:06 pm
Forum: Administration
Topic: bandwidht throtling with apache
Replies: 1
Views: 6482

Re: bandwidht throtling with apache

haven't done before but bm_mod seems to be a good way.

http://www.whoopis.com/howtos/web-bandw ... html#bwmod
by azfar
Thu Feb 09, 2012 9:28 pm
Forum: Jobs
Topic: [Req] Linux Administrator
Replies: 0
Views: 5319

[Req] Linux Administrator

For details and apply please visit:
http://www.rozee.pk/job_134022?&utm_sou ... JOB_SEARCH
by azfar
Thu Feb 02, 2012 6:27 pm
Forum: Programming
Topic: Help reuired regarding the script
Replies: 3
Views: 7139

Re: Help reuired regarding the script

glad your problem is solved. btw i feel stupid after making the script because in general it is just copying all files and folders to a another directory which can be done by 'cp' command simply :)

what was your exact scenario?
by azfar
Wed Feb 01, 2012 9:57 pm
Forum: Programming
Topic: Help reuired regarding the script
Replies: 3
Views: 7139

Re: Help reuired regarding the script

Code: Select all


#!/bin/sh

SRC=/root/scripts/input/
DEST=/root/scripts/output/
cd $SRC
for dir in `find -type d | cut -d"." -f 2`
do
mkdir -p $DEST/$dir
done

for file in `find -type f`
do
cat $file > $DEST/$file
done

Let me know if it suit you.
by azfar
Fri Jan 06, 2012 3:31 pm
Forum: Programming
Topic: radiusplugin (openvpn) session-timout problem.
Replies: 1
Views: 5544

Re: radiusplugin (openvpn) session-timout problem.

tried pam_auth_radius with openvpn but it is working worst then radiusplugin.
by azfar
Thu Jan 05, 2012 5:56 pm
Forum: Programming
Topic: radiusplugin (openvpn) session-timout problem.
Replies: 1
Views: 5544

radiusplugin (openvpn) session-timout problem.

Is there any one managing session-timeout from freeradius using radiusplugin with openvpn? it seems it need code hack.
by azfar
Fri Dec 23, 2011 3:53 pm
Forum: Programming
Topic: text filtering script
Replies: 2
Views: 6801

Re: text filtering script

what you want to parse?
by azfar
Fri Dec 23, 2011 3:50 pm
Forum: Programming
Topic: Help required regardind files deletion!
Replies: 2
Views: 6441

Re: Help required regardind files deletion!

I made one for me years back. #!/bin/bash path=/home/azfar/scripts/mail if [ $# -ne 2 ] then echo "Usage: $0 keyword keyword." echo "Both keywords should be same." exit fi if [ $1 == $2 ] then grep -lr "$1" $path/* > deletedfiles no=`wc -l deletedfiles | awk '{print $1}...
by azfar
Fri Jun 03, 2011 4:16 pm
Forum: Installation
Topic: Centos Tomcat howto
Replies: 1
Views: 7128

Centos Tomcat howto

Is there any updated apache tomcat howto for centos5/rhel5. I am following few ones but every one is outdated and I am having difficulties in finding the right packages and after so much problems I am finally stuck at mod_jk installation which is not being configuring and returning following error.....
by azfar
Fri May 21, 2010 9:54 am
Forum: Administration
Topic: log scrip
Replies: 10
Views: 9253

I had used ntop for network statistics but I am not sure how much it will be helpful to you.
by azfar
Sat May 15, 2010 7:58 pm
Forum: Administration
Topic: script to alert about filesystem
Replies: 5
Views: 5924

you have to put your threshold (80) in a file "usage".

When your usage reached 81% it will email you and only alert you next time when the usage reached to 82% and so on. It will reset the threshold to 80 when disk reduced below 81%.
by azfar
Sat May 15, 2010 7:49 pm
Forum: Administration
Topic: script to alert about filesystem
Replies: 5
Views: 5924

updated. #!/bin/sh subject="Disk Usage Warning" file=`pwd`/usage use=`cat $file` email="root" mbody=/tmp/body usage=`df -h /dev/sda1 | awk 'NR==1{next}{ if ($5 > '$use') print $6 " is at " $5;}'` usage1=`df -h /dev/sda1 | awk 'NR==1{next}{ if ($5 < 81) print $5;}' | cut...
by azfar
Sat May 15, 2010 6:18 pm
Forum: Administration
Topic: script to alert about filesystem
Replies: 5
Views: 5924

#!/bin/sh subject="Disk Usage Warning" file=`pwd`/usage use=`cat $file` email="root" mbody=/tmp/body usage=`df -h /dev/sda1 | awk 'NR==1{next}{ if ($5 > '$use') print $6 " is at " $5;}'` if [ -n "$usage" ]; then echo "$usage" > $mbody #mail -s "...
by azfar
Sat May 15, 2010 3:58 pm
Forum: Programming
Topic: find string script!
Replies: 7
Views: 11324

This worked.

Code: Select all

cat $ORI_FILE | grep -o -i $i >> $OUT_FILE
Now I can use regex as input easily because now its not going to print the input but output.