파일 복사 날짜를 기준으로 파일 찾기 및 삭제

파일 복사 날짜를 기준으로 파일 찾기 및 삭제

직장에서 누군가 잘못된 명령을 입력하여 결국 /etc/모든 파일과 폴더 /home/share(사용자 간 데이터를 공유하는 데 사용하는 폴더)에 있는 것 같습니다.

이제 다음과 같이 보입니다.

[email protected]:/home/share# ls -lrt
total 3148
drwxr-sr-x 12 mahavir teachers    4096 Mar  3  2015 to_check
-rw-r--r--  1    2101 users     120912 Jul 13  2015 aaa1peace.jpg
-rw-r--r--  1    2054 users      24340 Nov 14  2016 annual rainfalls manukarnika.ods
-rw-r--r--  1    2027 users      13891 Feb  8  2017 som Bahadur.odt
-rw-r--r--  1    2027 users      25743 Mar  3  2017 The Mother on Birthday.odt
drwxr-xr-x  2    2096 users      20480 Apr  5  2017 Kodai trip
drwxr-sr-x 21 mahavir users       4096 Apr 24 09:27 common
drwxr-s--- 15 mahavir teachers    4096 Apr 28 11:31 administration
-rw-r--r--  1 mahavir users    1579119 Aug 29 11:18 egor.odt
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 logrotate.d
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 ld.so.conf.d
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 cron.daily
drwxr-xr-x  4 root    root        4096 Oct 12 08:39 dpkg
drwxr-xr-x  2 root    root       12288 Oct 12 08:39 alternatives
drwxr-xr-x  4 root    root        4096 Oct 12 08:39 security
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 profile.d
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 pam.d
-rw-r--r--  1 root    root         552 Oct 12 08:39 pam.conf
-rw-r--r--  1 root    root         191 Oct 12 08:39 libaudit.conf
-rw-r--r--  1 root    root          19 Oct 12 08:39 issue.net
-rw-r--r--  1 root    root          26 Oct 12 08:39 issue
-rw-r--r--  1 root    root           9 Oct 12 08:39 host.conf
-rw-r--r--  1 root    root         604 Oct 12 08:39 deluser.conf
drwxr-xr-x  3 root    root        4096 Oct 12 08:39 default
-rw-r--r--  1 root    root        2969 Oct 12 08:39 debconf.conf
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 bash_completion.d
drwxr-xr-x  6 root    root        4096 Oct 12 08:39 apt
drwxr-xr-x 17 root    root        4096 Oct 12 08:39 skel
-rw-r-----  1 root    root        1548 Oct 12 08:39 shadow
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 selinux
-rwxr-xr-x  1 root    root         268 Oct 12 08:39 rmt
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 rc5.d
drwxr-xr-x  7 root    root        4096 Oct 12 08:39 network
-rw-r--r--  1 root    root         956 Oct 12 08:39 mke2fs.conf
-rw-r--r--  1 root    root          34 Oct 12 08:39 ld.so.conf
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 insserv.conf.d
-rw-r--r--  1 root    root         859 Oct 12 08:39 insserv.conf
drwxr-xr-x  3 root    root        4096 Oct 12 08:39 insserv
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 init.d
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 init
-rw-r--r--  1 root    root        2584 Oct 12 08:39 gai.conf
-rw-r--r--  1 root    root         367 Oct 12 08:39 bindresvport.blacklist
-rw-r--r--  1 root    root        1863 Oct 12 08:39 bash.bashrc
drwxr-xr-x  4 root    root        4096 Oct 12 08:39 udev
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 tmpfiles.d
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 sysctl.d
-rw-r--r--  1 root    root        2083 Oct 12 08:39 sysctl.conf
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 rcS.d
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 rc6.d
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 rc4.d
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 rc3.d
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 rc2.d
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 rc1.d
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 rc0.d
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 modules-load.d
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 modprobe.d
-rw-------  1 root    root         860 Oct 12 08:39 gshadow-
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 binfmt.d
drwxr-xr-x  5 root    root        4096 Oct 12 08:39 xdg
-rw-r--r--  1 root    root          13 Oct 12 08:39 timezone
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 terminfo
drwxr-xr-x  6 root    root        4096 Oct 12 08:39 systemd
-rw-------  1 root    root         604 Oct 12 08:39 subuid-
-rw-------  1 root    root         604 Oct 12 08:39 subgid-
-rw-r--r--  1 root    root         771 Oct 12 08:39 staff-group-for-usr-local
-rw-------  1 root    root        1670 Oct 12 08:39 shadow-
-rw-r--r--  1 root    root       19605 Oct 12 08:39 services
-rw-r--r--  1 root    root        4038 Oct 12 08:39 securetty
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 rsyslog.d
-rw-r--r--  1 root    root         887 Oct 12 08:39 rpc
-rwxr-xr-x  1 root    root         306 Oct 12 08:39 rc.local
-rw-r--r--  1 root    root        2932 Oct 12 08:39 protocols
-rw-r--r--  1 root    root         761 Oct 12 08:39 profile
-rw-------  1 root    root        2455 Oct 12 08:39 passwd-
drwxr-xr-x  3 root    root        4096 Oct 12 08:39 opt
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 newt
-rw-r--r--  1 root    root        8453 Oct 12 08:39 nanorc
-rw-r--r--  1 root    root         286 Oct 12 08:39 motd
-rw-r--r--  1 root    root        5173 Oct 12 08:39 manpath.config
-r--r--r--  1 root    root          33 Oct 12 08:39 machine-id
-rw-r--r--  1 root    root         613 Oct 12 08:39 logrotate.conf
-rw-r--r--  1 root    root       10478 Oct 12 08:39 login.defs
-rw-r--r--  1 root    root        9017 Oct 12 08:39 locale.gen
drwxr-xr-x  4 root    root        4096 Oct 12 08:39 kernel
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 iproute2
-rw-------  1 root    root        1022 Oct 12 08:39 group-
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 groff
-rw-r--r--  1 root    root         846 Oct 12 08:39 fstab
-rw-r--r--  1 root    root           0 Oct 12 08:39 environment
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 discover.conf.d
drwxr-xr-x  4 root    root        4096 Oct 12 08:39 dhcp
drwxr-xr-x  4 root    root        4096 Oct 12 08:39 dbus-1
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 cron.weekly
-rw-r--r--  1 root    root         722 Oct 12 08:39 crontab
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 cron.monthly
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 cron.hourly
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 cron.d
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 calendar
-rw-r--r--  1 root    root         217 Oct 12 08:39 aliases
-rw-r--r--  1 root    root        2981 Oct 12 08:39 adduser.conf
-rw-r--r--  1 root    root        4812 Oct 12 08:39 wgetrc
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 vim
-rw-r--r--  1 root    root          89 Oct 12 08:39 shells
-rw-r--r--  1 root    root        3663 Oct 12 08:39 screenrc
-rw-r--r--  1 root    root        2632 Oct 12 08:39 rsyslog.conf
drwxr-xr-x  3 root    root        4096 Oct 12 08:39 postfix
-rw-r--r--  1 root    root          60 Oct 12 08:39 networks
lrwxrwxrwx  1 root    root          12 Oct 12 08:39 mtab -> /proc/mounts
-rw-r--r--  1 root    root         195 Oct 12 08:39 modules
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 mdadm
drwxr-xr-x  4 root    root        4096 Oct 12 08:39 lvm
drwxr-xr-x  5 root    root        4096 Oct 12 08:39 logcheck
-rw-r--r--  1 root    root        2492 Oct 12 08:39 locale.alias
-rw-r--r--  1 root    root         144 Oct 12 08:39 kernel-img.conf
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 kbd
-rw-r--r--  1 root    root        1748 Oct 12 08:39 inputrc
drwxr-xr-x  5 root    root        4096 Oct 12 08:39 initramfs-tools
-rw-r--r--  1 root    root         329 Oct 12 08:39 hosts
-rw-r--r--  1 root    root         346 Oct 12 08:39 discover-modprobe.conf
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 console-setup
-rw-r--r--  1 root    root          45 Oct 12 08:39 bash_completion
drwxr-xr-x  3 root    root        4096 Oct 12 08:39 acpi
drwxr-xr-x 10 root    root        4096 Oct 12 08:39 X11
-rw-r--r--  1 root    root        1260 Oct 12 08:39 ucf.conf
drwxr-xr-x  4 root    root        4096 Oct 12 08:39 ssl
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 python2.7
drwxr-xr-x  5 root    root        4096 Oct 12 08:39 perl
-rw-r--r--  1 root    root         767 Oct 12 08:39 netconfig
-rw-r--r--  1 root    root       24146 Oct 12 08:39 mime.types
-rw-r--r--  1 root    root         449 Oct 12 08:39 mailcap.order
-rw-r--r--  1 root    root         111 Oct 12 08:39 magic.mime
-rw-r--r--  1 root    root         111 Oct 12 08:39 magic
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 libpaper.d
drwxr-xr-x  5 root    root        4096 Oct 12 08:39 ldap
drwxr-xr-x  3 root    root        4096 Oct 12 08:39 hotplug
drwxr-xr-x  3 root    root        4096 Oct 12 08:39 gss
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 xinetd.d
-rw-r--r--  1 root    root         289 Oct 12 08:39 xinetd.conf
-rw-r--r--  1 root    root        1343 Oct 12 08:39 wodim.conf
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 wildmidi
-rw-r--r--  1 root    root          51 Oct 12 08:39 vdpau_wrapper.cfg
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 UPower
-rw-r--r--  1 root    root         279 Oct 12 08:39 updatedb.conf
drwxr-xr-x  3 root    root        4096 Oct 12 08:39 ufw
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 timidity
drwxr-xr-x  3 root    root        4096 Oct 12 08:39 texmf
-r--r-----  1 root    root         669 Oct 12 08:39 sudoers
-rw-r--r--  1 root    root         586 Oct 12 08:39 subgid
drwxr-xr-x  3 root    root        4096 Oct 12 08:39 sound
-rw-r--r--  1 root    root       10344 Oct 12 08:39 sensors3.conf
drwxr-xr-x  3 root    root        4096 Oct 12 08:39 resolvconf
-rw-r--r--  1 root    root        3173 Oct 12 08:39 reportbug.conf
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 pulse
drwxr-xr-x  5 root    root        4096 Oct 12 08:39 polkit-1
-rw-r--r--  1 root    root        2217 Oct 12 08:39 passwd.org
-rw-r--r--  1 root    root        2469 Oct 12 08:39 passwd.bu0
-rw-------  1 root    root           5 Oct 12 08:39 pam_ldap.secret
-rw-r--r--  1 root    root        8848 Oct 12 08:39 pam_ldap.conf
lrwxrwxrwx  1 root    root          21 Oct 12 08:39 os-release -> ../usr/lib/os-release
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 openal
-rw-r--r--  1 root    root        2064 Oct 12 08:39 netscsid.conf
-rw-r--r--  1 root    root        4565 Oct 12 08:39 Muttrc
-rw-r--r--  1 root    root         125 Oct 12 08:39 mail.rc
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 libnl-3
-rw-r--r--  1 root    root          26 Oct 12 08:39 libao.conf
-rw-r--r--  1 root    root      109676 Oct 12 08:39 ld.so.cache
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 ImageMagick-6
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 gtk-3.0
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 gtk-2.0
-rw-r--r--  1 root    root       10852 Oct 12 08:39 gnome-vfs-mime-magic
drwxr-xr-x  3 root    root        4096 Oct 12 08:39 gnome-vfs-2.0
drwxr-xr-x  4 root    root        4096 Oct 12 08:39 ghostscript
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 geoclue
drwxr-xr-x  5 root    root        4096 Oct 12 08:39 gconf
-rw-r--r--  1 root    root         280 Oct 12 08:39 fuse.conf
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 foomatic
drwxr-xr-x  4 root    root        4096 Oct 12 08:39 fonts
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 firefox-esr
drwxr-xr-x 12 root    root        4096 Oct 12 08:39 etckeeper
-rw-r--r--  1 root    root         312 Oct 12 08:39 email-addresses
drwxr-xr-x  3 root    root        4096 Oct 12 08:39 emacs
-rw-r--r--  1 root    root        3739 Oct 12 08:39 drirc
-rw-r--r--  1 root    root        1131 Oct 12 08:39 dleyna-server-service.conf
-rw-r--r--  1 root    root        1132 Oct 12 08:39 dleyna-renderer-service.conf
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 dictionaries-common
-rw-r--r--  1 root    root           4 Oct 12 08:39 debian_version
drwxr-xr-x  5 root    root        4096 Oct 12 08:39 cups
-rw-r--r--  1 root    root           5 Oct 12 08:39 cron.allow
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 cracklib
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 check_mk
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 bonobo-activation
-rw-r--r--  1 root    root        7439 Oct 12 08:39 bogofilter.cf
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 at-spi2
-rw-r-----  1 root    root         144 Oct 12 08:39 at.deny
-rw-r--r--  1 root    root           5 Oct 12 08:39 at.allow
drwxr-xr-x  3 root    root        4096 Oct 12 08:39 apparmor.d
drwxr-xr-x  3 root    root        4096 Oct 12 08:39 apm
-rw-r--r--  1 root    root         112 Oct 12 08:39 apg.conf
-rw-r--r--  1 root    root         401 Oct 12 08:39 anacrontab
drwxr-xr-x  3 root    root        4096 Oct 12 08:39 gimp
drwxr-xr-x  6 root    root        4096 Oct 12 08:39 gdm3
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 wpa_supplicant
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 PackageKit
drwxr-xr-x  6 root    root        4096 Oct 12 08:39 NetworkManager
drwxr-xr-x  3 root    root        4096 Oct 12 08:39 ifplugd
drwxr-xr-x  3 root    root        4096 Oct 12 08:39 apache2
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 xboard
-rw-r--r--  1 root    root         888 Oct 12 08:39 usb_modeswitch.conf
-rw-r--r--  1 root    root         586 Oct 12 08:39 subuid
drwxr-xr-x  4 root    root        4096 Oct 12 08:39 speech-dispatcher
-rw-r--r--  1 root    root        5109 Oct 12 08:39 rygel.conf
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 purple
-rw-r--r--  1 root    root        7649 Oct 12 08:39 pnm2ppa.conf
-rw-r--r--  1 root    root        2458 Oct 12 08:39 passwd.bu2
-rw-r--r--  1 root    root        2418 Oct 12 08:39 passwd
-rw-r--r--  1 root    root           7 Oct 12 08:39 papersize
drwxr-xr-x  3 root    root        4096 Oct 12 08:39 openvpn
drwxr-xr-x  6 root    root        4096 Oct 12 08:39 nginx
-rw-r--r--  1 root    root          19 Oct 12 08:39 mailname
-rw-r--r--  1 root    root       56160 Oct 12 08:39 mailcap
lrwxrwxrwx  1 root    root          34 Oct 12 08:39 localtime -> ../usr/share/zoneinfo/Asia/Kolkata
-rw-------  1 root    root           5 Oct 12 08:39 libnss-ldap.secret
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 hp
-rw-r--r--  1 root    root         711 Oct 12 08:39 hosts.deny
-rw-r--r--  1 root    root         411 Oct 12 08:39 hosts.allow
-rw-r--r--  1 root    root         207 Oct 12 08:39 [email protected]:58:53
-rw-r--r--  1 root    root          19 Oct 12 08:39 hostname
-rw-r-----  1 root    root         852 Oct 12 08:39 gshadow
-rw-r--r--  1 root    root        1010 Oct 12 08:39 group
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 gnome-chess
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 cupshelpers
drwxr-x---  2 root    root        4096 Oct 12 08:39 chatscripts
-rw-r--r--  1 root    root        7727 Oct 12 08:39 ca-certificates.conf
-rw-r--r--  1 root    root       12288 Oct 12 08:39 aliases.db
-rw-r--r--  1 root    root         185 Oct 12 08:39 [email protected]:18:19
-rw-r--r--  1 root    root         194 Oct 12 08:39 [email protected]:51:04
drwxr-xr-x  4 root    root        4096 Oct 12 08:39 smartmontools
-rw-r--r--  1 root    root        7096 Oct 12 08:39 smartd.conf
-rw-r--r--  1 root    root         102 Oct 12 08:39 resolv.conf
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 python3.4
drwxr-xr-x  5 root    root        4096 Oct 12 08:39 php5
-rw-r--r--  1 root    root        2470 Oct 12 08:39 passwd.bu1
-rw-r--r--  1 root    root        3052 Oct 12 08:39 passwd_1
-rw-r--r--  1 root    root         611 Oct 12 08:39 nsswitch.conf.org
-rw-r--r--  1 root    root         589 Oct 12 08:39 nsswitch.conf
-rw-r-----  1 root    root         664 Oct 12 08:39 nslcd.conf
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 ltsp
-rw-r--r--  1 root    root         599 Oct 12 08:39 [email protected]:57:42
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 libreoffice
-rw-r--r--  1 root    root        9833 Oct 12 08:39 libnss-ldap.conf
-rw-r--r--  1 root    root         206 Oct 12 08:39 idmapd.conf
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 icedtea-web
drwxr-xr-x  3 root    root        4096 Oct 12 08:39 firebird
-rw-r--r--  1 root    root         444 Oct 12 08:39 exports
drwxr-xr-x  3 root    root        4096 Oct 12 08:39 avahi
-rw-r--r--  1 root    root          44 Oct 12 08:39 adjtime
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 w3m
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 udisks2
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 sudoers.d
drwxr-xr-x  3 root    root        4096 Oct 12 08:39 sgml
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 sensors.d
drwxr-xr-x  3 root    root        4096 Oct 12 08:39 sane.d
drwxr-xr-x  5 root    root        4096 Oct 12 08:39 java-7-openjdk
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 GNUstep
drwxr-xr-x  3 root    root        4096 Oct 12 08:39 exim4
drwxr-xr-x  3 root    root        4096 Oct 12 08:39 cruft
drwxr-xr-x  3 root    root        4096 Oct 12 08:39 ca-certificates
drwxr-xr-x  3 root    root        4096 Oct 12 08:39 xml
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 usb_modeswitch.d
drwxr-xr-x  3 root    root        4096 Oct 12 08:39 thunderbird
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 ssh
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 request-key.d
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 python3
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 python
drwxr-xr-x  7 root    root        4096 Oct 12 08:39 ppp
drwxr-xr-x  3 root    root        4096 Oct 12 08:39 pm
drwxr-xr-x  3 root    root        4096 Oct 12 08:39 nbd-server
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 Muttrc.d
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 ldap-account-manager
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 iscsi
-rw-r--r--  1 root    root        1259 Oct 12 08:39 inetd.conf
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 grub.d
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 gnome
drwxr-xr-x  3 root    root        4096 Oct 12 08:39 emacs24
drwxr-xr-x  2 root    root        4096 Oct 12 08:39 bluetooth

Oct 12 08:39이 폴더에서 이동한 모든 파일을 삭제하고 싶습니다 . 내 명령은 find다음과 같습니다

find . -newermt 2017-10-12 -ls | grep root

위의 명령을 사용하면 삭제하고 싶은 모든 파일을 find삭제할 수 있었는데 , 유일하게 누락된 것은 명령인데 어디에 맞춰야 할지 모르겠습니다 . 아니면 내 명령 에 구문 오류가 있습니까 ?greprmrmfind

Oct 12 08:39복사된 파일을 삭제하는 다른 방법도 환영합니다.

답변1

find /home/share -user root -newermt 2017-10-12 -ls -exec rm -rf {} \;

위의 명령은 루트에 속해 하루 동안 수정된 모든 파일을 찾아 October 12th 2017삭제합니다.

답변2

노력하다

find . -newermt 2017-10-12 -ls | awk '$5 == "root" && NF == 11 { printf "rm -rf %s\n",$9;}' 

괜찮아 보이면 추가하세요| bash

find . -newermt 2017-10-12 -ls | awk '$5 == "root" && NF == 11 { printf "rm -rf %s\n",$9;}' | bash

노트:

  • 흥미로운 파일 이름(공백이 있는 이름, 새 줄 등)이 없다고 가정합니다./etc
  • 먼저 백업을 확인하세요.

관련 정보