SCR/TP09/tp09-reponses.txt

60 lines
1.7 KiB
Plaintext
Raw Normal View History

2022-11-15 15:35:45 +01:00
Partie I / Question 1)
find . -name "*.install" -type d
Question 2)
find . -name "*.d" -type f
Question 3)
find . -empty -type d
Question 4)
find . -size -1000c -type f
Question 5)
find . -size +30000c -type f
Question 6)
find . -size -1k -type f
Question 7)
find . -size 2b -type f
Question 8)
find . -size +30b -type f
Question 9)
find . -size -3b -type f
Question 10)
find . -size +1b -type f -size -4b
Question 11)
find . -newer lib/krb5/synch/atom.install
Question 12)
find ./lib/krb5/synch/ -mtime -4
Question 13)
find /lib/kernel/install.d -mtime +3
Question 14)
find -mtime 3 -atime 2
Question 15)
find -type d -perm /022
Question 16)
find -type d -perm -444
Question 17)
find -type d -perm 644
Partie II / Question 1)
2022-11-15 17:12:10 +01:00
cp $(find . -maxdepth 4 -type f -name "[(:digit:)]*") lib/kernel/config/AA/BB/CC/
cp $(find . -maxdepth 4 -type f -name "[(:digit:)]*") lib/kernel/config/AA/BB/CC/XX
cp $(find . -maxdepth 4 -type f -name "[(:digit:)]*") lib/kernel/config/AA/BB/DD
cp $(find . -maxdepth 4 -type f -name "[(:digit:)]*") lib/kernel/config/AA/BB/DD/YY
find . -maxdepth 4 -type f -name "[(:digit:)]*" -exec cp '{}' lib/kernel/config/AA/BB/CC \;
find . -maxdepth 4 -type f -name "[(:digit:)]*" -exec cp '{}' lib/kernel/config/AA/BB/CC/XX \;
find . -maxdepth 4 -type f -name "[(:digit:)]*" -exec cp '{}' lib/kernel/config/AA/BB/DD \;
find . -maxdepth 4 -type f -name "[(:digit:)]*" -exec cp '{}' lib/kernel/config/AA/BB/DD/YY \;
Question 2)
find . -amin +30
Question 3)
find . -mindepth 6 -type d -name "[[:upper:]]*" -exec chmod 0700 {} \;
Question 4)
find . -cmin +15
Partie III / Question 1)
find / -type f -name "*.h" -print -quit 2> /dev/null
Question 2)
find / -newer ../TRee/lib/kernel/config/AA/BB/DD/YY/transm.d -printf "%p -- %c\n" 2> /dev/null