NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

scp root@ipadresi:/etc/yum.repos.d/* /etc/yum.repos.d

touch
echo
chmod
chgrp
chown
ln
cat
vi
nano
more
less
diff
tail
head
mv
cp
scp
ssh
mkdir
rm

repo server da program aramak için;
yum search ngnix --> repoda ngnix'i aramak için veya ngnix yerine ht yazarsam ht ile başlayanları araştırıyoruz.


head->Dosyanın baş kısmını gösterir
head baştan_gösterilecek satır_sayısı Dosya_ismi
tail->Dosyanın sın kısmını gösterir

NOT: Linux dosya snapshot alma işlemi var. Onu araştır.
head sshd_config
head -n 15 sshd_config --> sshd_config üstten aşağıya doğru 15 adet satır getirir.

tail sshd_config
tail -n 15 sshd_config --> sshd_config alttan yukarıya doğru 15 adet satır getirir.

tail -f --> dosyadaki gerçek zamanlı alttan yukarı gelen dataları gösterir. Canlı data akışı olan dosyalarda kullanırız. Özellikle syslog
gibi logların yazılan dosyalarda kullanılır.

Sistem loglarını gerçek zamanlı görmek için;
tail -f /var/log/messages -->>> redhat centos tabanlı sistemlerdeki log.
tail -f /var/log/audit/audit.log
tail -f /var/log/audit/audit.log | grep firewalld ---> firewalld logları buraya yazılıyor. Bu şekilde filtreleyebiliriz. firewalld değişkendir.

more- > sayfa sayfa ilerlemek için
more dosya_ismi
less -> satır satır görüntülemek için
less dosya_ismi

diff dosya_ismi1 dosya_ismi2
diff sshd_config-bck sshd_config

vi editör
vi +150 deneme -> deneme isimli dosyayı aç ve imleci 150.satıra konumlandır.
vi + deneme --> deneme isimli dosyayı aç ve imleci son satıra konumlandır.
vi -r {file} -> kurtarma modu. Bozulmuş dosyanın takas (swap) dosyası kullanılarak (.swp şeklindedir)
kurtarma işlemi gerçekleştirilir.

dd -> imlecin üzerinde bulunduğu satırın tamamını siler. insert moda girmeden.
u -> ( undo ) son yapılan işlemi geri almak için.
2dd -> imlecin üzerinde bulunduğu satır ve altındaki satırın tamamını siler
d} -> imlecin üzerinde bulunduğu paragrafı siler.
NOT: Metin bloklarının yerini değiştirme--> bunu araştır ve çalışma yap. (vi editör)
Metin bloklarının yerini değiştirme ->
insert moda girmeden satırın başına gel ve dd ile KES
yapıştırılacak yere gel esc yap ve p tuşu ile yapıştır.
Birden fazla satırı kesmek için bulunduğun satırın xsatır altı için örneğin
5 satırı kesmek için 5dd yapıyoruz. 5 satırı kesip yapıştırma yerine gidiyoruz.pp ile
yapıştırılıyor.
satıra gel ve y tuşu KOPYALA - yapıştırılacak yere git. p ile yapıştır.

NOT: sistemimdeki dosyaların 777 yetkisi olanların günlük cronjob a eklenerek taraması
yapılabilir. Bunu tespit etmek için bunu nasıl olmalı ?

2.14. Dosya Tarama slayt resmi telefonda
find -perm 777 >> dosyalar.txt --> yetkisi 777 olanları bul ve dosyalar.txt ye aktar.

find -exec rm -rf {} ; ---> find ile bulur. Bulduktan sonra rm- rf komutu çalışır ve süslü parantez içi boş
olmasından dolayı döngü bitene kadar içine datayı alır ve komutu çalıştırır.

Ödev:

2.15 tar komutu ( arşivleme)
arşivleme için;
tar -parametre arşiv_dosyası.tar hangi Dosya/dosyalar
tar -cvf arsiv.tar file1 file2 file3
arşivi almak için;
tar -xvf arsiv.tar
-c-> create
-x-> extract

scp [email protected]:/tmp/tar-1.30-5.el8.x86_64.rpm /tmp/
rpm -ivh tar-1.30-5.el8.x86_64.rpm

gzip komutu;
gzip dosyaismi


ÖDEV: ziplenmiş (TAR) dosyanın içeriğini nasıl görürüz. !!!!

Kullanıcı Oluşturma;
useradd yunus - -> yunus oluşturuldu fakat password'u yok.
ls -l /home/ ile klasör oluştuğunu gözlemleriz.
passwd yunus

userdel kullanıcı -> kullanıcıyı siler
userdel -r kullanıcı -> kullanıcıyı ve home klasörünü siler







     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.