Linuxhotel Wiki

Wie ging das nochmal?

Benutzer-Werkzeuge

Webseiten-Werkzeuge


lpi1:find

Dies ist eine alte Version des Dokuments!


find

cd
cp -a /usr/share/doc/ .
time find doc -type f -executable -exec chmod -x {} \;
time find doc -type f -executable -exec chmod -x {} +;
find doc -type f -executable -print0 | xargs -0 chmod -x
find / -xdev -uid 1002 -exec chown root {} \;
find / -type f -printf "%s %p\n" | sort -n | tac | head -5

[root@localhost ~]# touch -d '12 hours ago' /tmp/12_hours_ago [root@localhost ~]# touch -d '1 day 12 hours ago' /tmp/1_day_12_hours_ago [root@localhost ~]# touch -d '1 day ago' /tmp/1_day_ago [root@localhost ~]# [root@localhost ~]# [root@localhost ~]# find /tmp -name '*ago' -mtime -1 /tmp/12_hours_ago /tmp/1_day_12_hours_ago [root@localhost ~]# find /tmp -name '*ago' -mtime 1 /tmp/1_day_ago /tmp/1_dayago [root@localhost ~]# rm /tmp/1_dayago rm: remove regular empty file `/tmp/1_day__ago'? y [root@localhost ~]# find /tmp -name '*ago' -mtime +1 [root@localhost ~]# touch -d '2 days ago' /tmp/2_days_ago [root@localhost ~]# find /tmp -name '*ago' -mtime +1 /tmp/2_days_ago [root@localhost ~]# date -r /tmp/1_day_12_hours_ago Tue Nov 25 23:11:17 CET 2014

lpi1/find.1416910517.txt.gz · Zuletzt geändert: 2014/11/25 10:15 (Externe Bearbeitung)