Skip to content

Instantly share code, notes, and snippets.

@ahmeti
Last active July 18, 2021 13:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ahmeti/6d48ff04e5aec078e944524c1e2307de to your computer and use it in GitHub Desktop.
Save ahmeti/6d48ff04e5aec078e944524c1e2307de to your computer and use it in GitHub Desktop.
# 01. Sanal Bellek Oluşturma ve Başlatma
cd /var
touch swapfile
chmod 600 swapfile
/bin/dd if=/dev/zero of=/var/swapfile bs=1M count=10000
/sbin/mkswap /var/swapfile
/sbin/swapon /var/swapfile
# 02. Sanal Belleği Reboot Sonrası Otomatik Başlatma
nano /etc/fstab
# Açılan dosyanın en son satırına aşağıdaki kodu ekliyoruz.
/var/swapfile none swap sw 0 0
# 03. Sanal Belleği Silme
swapoff -a
# 04. Sunucumuza Uzaktan Dosya İndirme (Download)
wget https://example.com/yedek.zip
# 05. Sunucumuzda Bir Klasörü Nasıl Zipleriz?
apt-get install zip unzip
# Klasörümüzü zipliyoruz
zip -r klasor.zip klasor-yolu
# 06. Sunucumuzda Ziplenmiş Bir Dosyayı Nasıl Açarız? (Extract)
unzip file.zip -d klasor-adi
# 07. Sunucumuzda Dosya veya Klasör Araması Nasıl Yaparız?
# Tüm .jpg uzantılı dosyaları listelemek için
find . -name "*.jpg"
# Tüm .php ve .js uzantıları hariç dosyaları listelemek için
find . -not -name "*.php" -not -name "*.js"
# 08. Sunucumuzda Herhangi Bir Klasörün Boyutunu Nasıl Öğreniriz?
du -hs /klasor/yolu
# 09. Sunucumuzda Herhangi Bir Kullanıcıyı Nasıl Sileriz?
sudo deluser --remove-home kullanici-adi
10. Sunucumuzda Bir Klasörü Nasıl Tar.Gz ile Sıkıştırırız?
tar -czvf filename.tar.gz /klasor/yolu
# 11. Sunucumuzda Tar.Gz ile Sıkıştılmış Bir Dosyayı Nasıl Açarız?
tar -xf archive.tar.gz -C /klasor/yolu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment