/etc dizinimiz olsun
icinde bi dolu dosyamiz olsun
bu dosyalarin icinde istedigimiz bir kelimeyi veya yumagini nasil ariyoruz.
farkli sekilleri ile soyle oluyor.
LKD listelerini uzaktan takip et yakala 😀

Secenek 1


Merhaba,
bu islem icin grep komutunu kullanabilirsiniz. ornegin,
#grep -r "85.247.28.245" /etc
seklinde bir kullanim ile IP adresinin gectigi tum dosyalarin listesini alabilirsiniz. isterseniz > dosya ile de ciktiyi bir dosyaya yazdirabilirsiniz.
Kolay gelsin...

Secenek 2


Selamlar.

ilgili klasore gecip

# find . | xargs egrep -i “88.247.28.245”

yazarsaniz size gectigi dosyalari gosterecektir.

Secenek 3


grep 88\.247\.28\.245 /etc/*
yardimiyla bakabilirsiniz..

Tamda bu konu hakkinda muhabbet gecmis lkd listedelerinde.
Alinti yapayim dursun lazim olur gunu gelince.
***

#!/bin/bash
# findstring.sh:
# Find a particular string in binaries in a specified directory.
# usage: ./findstring.sh dir str

for file in $( find $1 -type f | sort )
do
strings -f $file | grep “$2” | sed -e “s%$1%%”
done

***

find . -type f -print -exec grep mail '{}' \;

komutu icinde bulundugun dizin ve latinda tum dosylarda icinde
mail gecen satirlari yazar.

***

asagıdaki komut bulundugun klasordeki ve ek olarak xxx
klasorundeki butun php uzantili dosyalarin icerisinde mail kelimesi
gecen satirlari gosterecektir.

cat *.php xxx/*.php | grep mail

Other files you may want to have a look at will be in /var/adm & /var/log (depending on your server).

A good way to determine what is taking up the most space and what can be cleaned up is to first determine what directories are using the most.

For example, if you have a /var partition and want to calculate which directories are using the most space, do this:

# cd /var
# du -skx * : sort -n

It will show you each directory directly under /var and the amount of space it is using in kilobutes. You can then use that info to determine if it is indeed log files in /var/log. Or maybe your mail server has a lot of extra queue files that are not getting processed and they are taking up your disk space… stuff like that.

Another thing to look for is extraneous core files from crashed processes that you do not need for debugging purposes. Usually they’re not that big but for bigger apps (database, etc) they can get quite large.

You can do one of two commands to find core files:

* traditional find command – this is more resource intensive if you have a large amount of data, but is the “best” because it works on EVERY Unix server

# find / -name core -print

* locate, which should work on most Linux machines but may not tell you about recent core files:

# locate core

find . -name *.log : xargs rm
was the way I was going to go, but then it said
-bash: /usr/bin/find: Argument list too long
rm: too few arguments

I also tried
mv *.log /dev/null
which generated a similar error.

Silly me, I thought it was rm that was complaining when it was in fact bash!!
Obviously the string that bash generates by expanding wildcard ‘*.log’ is too long for it to pass to any command.
Just like Juri said it is a shell limitation.I have looked, but havent seen any options or shell variables that would let me up this limit.

So I escaped the wildcard and let ‘find’ handle it by
find . -name ‘*.log’ : xargs rm
which did it.

[01:21:57] [@Jetski] iyidir be shukko 🙂
[01:22:01] [@Jetski] senden naber ?
[01:22:16] [@shukko] iidr bana bisi sormussun ?
[01:22:30] [@shukko] bende usb stick mp3 playerima slax kurdum bugun isyerinde canim sikildi
[01:22:30] [@Jetski] hallettim shukko heval sagolsun yardim etti
[01:22:37] [@shukko] 8139 modulunu aktif edemedim sinir oldum
[01:22:40] [@Jetski] ha onu sorucaktim
[01:22:51] [@Jetski] en baba linux hangisi ?
[01:23:02] [@Jetski] + nerden cekerim 🙂
[01:23:45] [@shukko] en baba linux = senin en iyi bildigin yada senin ihtiyacin olan linuxdur Jetski gerci burdada sacmalik var deyiste cunku linux= kernel ha sen en iyi dagitim hangisi diyosan bunun cevabida senin ne bekledigine gore degisir dagitimdan
[01:24:31] [@Jetski] shukko, hangisi en saglam calisan linux suan grafik arayuzlu dayanikli kullanisli vs..
[01:25:04] [Bon] auhahuahu
[01:25:14] [@shukko] Jetski saglamlik + grafik arayuz bir arada bulunacak seyler degiller
[01:25:20] [@shukko] grafik arayuz = noob isi 🙂
[01:25:26] [@shukko] LFS yi begeniyorum ben Jetski
[01:25:29] [Bon] adam sewio demekki shukko
[01:25:43] [Bon] grafik zimbiritli sistemleri
[01:26:38] [Bon] kahve yapayim
[01:26:39] [@shukko] Jetski ne istiyosun linuxdan sen ne bekliyosun nasil bir kullanicisin amacin ne sorular bunlar olmali sana en basitinden 1 kac secenek soylim
[01:26:40] [Bon] 1 ADET
[01:26:54] [@Jetski] seni dinliyorum shukko
[01:26:57] [Bon] shukko �ay i�meye gitmedik ya
[01:26:59] [@Jetski] sen ne kullaniyorsun suan ?
[01:27:05] [@Jetski] hasan selam 🙂
[01:27:10] [@shukko] 1- eger civ civ bocek ben linuxa yeni basladim herboku olsun linux olsun ama masaustu olsun civil civil olsun kolay olsun = mandrake linux
[01:27:12] [Bon] jet hello
[01:27:26] [@shukko] 2- isimi yapicam ben sade ama saglam ama kuvvetli ve basit olsun = fedora core 3
[01:27:54] [@shukko] 3- ben open sourcesi olucam kendim bu tur olaylara ilgim var nedir bu community olaylari = debian veya daha iyisi = ubuntu
[01:28:06] [@Jetski] grafik arayuz yok degilmi fedora core3 ‘de.
[01:28:13] [@shukko] 4- ben olaya kokten baslamak istiyom linux gibi linux istiyom azicik kurcalicam ogrencem = slackware
[01:28:15] [Bon] jet adam yazio ya
[01:28:18] [Bon] yok demekki
[01:28:19] [Bon] ula
[01:28:25] [@shukko] 5- ben taragi yemek istiyorum evet evet hemde delisi olucam = gentoo
[01:28:30] [@shukko] 5 dagitim yeterlimi ?
[01:28:34] [@Jetski] eheh
[01:28:36] [@Jetski] 🙂
[01:28:43] [@Jetski] mcx shukko]]

yaz bul ok 🙂

yada :::

How-To: Finding which bootloader is used
Some of the current images of Redhat (specifically RHEL) have both bootloaders installed on the system. This makes it somewhat annoying when you are doing kernel upgrades as you have to modify both loader config or take a gamble.

Therefore, if you wish to find out which bootloader is used on the system, you will need to su to root.
As root, you need to run either of these commands:

dd if=/dev/hda bs=512 count=1 2>&1 : grep GRUB
AND
dd if=/dev/hda bs=512 count=1 2>&1 : grep LILO

If the bootloader is found then it will say: Binary file (standard input) matches and this indicates this is the bootloader your system will use on startup.

This command will work on any of the RedHat based systems.

*IF* you have grub installed, an even easier solution to find out what the actual bootloader is, is:

/sbin/grubby –bootloader-probe

It will print out whether grub or lilo is in use. If it prints something else, you must have an extraordinary bootloader.
Once you made sure you use grub, I’d recommend removing lilo by issuing.

rpm -e lilo

quote:
——————————————————————————–

[mysqld]
skip-locking
key_buffer=16M
join_buffer=1M
record_buffer=1M
sort_buffer=2M
table_cache=1028
max_connections=250
thread_cache_size=286
max_allowed_packet=5M
connect_timeout=15
query_cache_limit=1M
query_cache_size=32M
query_cache_type=1
thread_concurrency=2
wait_timeout=15

——————————————————————————–

httpd.conf user

quote:
——————————————————————————–

Timeout 300
KeepAlive Off
MinSpareServers 7
MaxSpareServers 13
StartServers 7
MaxRequestsPerChild 50

——————————————————————————–