DEFINITIONS
Definitions More Info.
Definition ID
699
Title
LINUX
Category
BASH SCRIPT
Definition
find filenames without path
Definition Description
find /storage/sqlArchive/SQLBackup_Archive20160201155820/* -maxdepth 0 -name SqlBackup20160201095907 -printf "%f\n" | sort -h | wc -l|tee -a $ echo "$new_clrstrt
Total Number Of Files After Archived : $line $new_clrend" done
Aciklama: Buradaki maksat, SQL.... isimli klasorun adltindaki tum dosylarin icinden "SqlBackup20160201095907" adli dosyayi bul, 0 sifirinci level a bak, yani altklasorlere bakma , -printf sonucu path gostermeden yazdir, sort sirala -h ters cevir, dosyalari saydir ve log yaz.
find /storage/sqlBackup/* -maxdepth 0 ! -name SqlBackup20160201095907 ! -newer /storage/sqlBackup/SqlBackup20160201095907 -printf "%f\n"
Aciklama
! -name ile adi SqlBackup20160201095907 disindaki dosyalara bakiyor, SqlBackup20160201095907 dosyadan daha yeni olmayanlari aliyor.
daha gelismisi:
find /storage/sqlBackup/* -maxdepth 0 ! -name SqlBackup20160201095907 ! -newer /storage/sqlBackup/SqlBackup20160201095907 -printf "%f\n" | sort -h |tee /storage/cronLogs/hede.log | while read line ;do done
RecordBy
cunay
Record Date
01-02-2016 15:57:18
Düzenle
Kopyala
Sil