find 配合 xargs 删除乱码文件的方法

# ls
?????5e?跖                          ooo-scm-1.3.1.180611-SNAPSHOT.zip  redis.txt                            zabbix_api.py
?????5e?跖Ք?d??ݢ??N?9L?]??????l???  fdisk.sh                           tengine-2.1.2
anaconda-ks.cfg                     jdk-8u171-linux-x64.tar.gz         tengine-2.1.2.tar.gz
apache-maven-3.3.9-bin.tar.gz       mysql.txt                          zabbix-agent-3.4.3-1.el7.x86_64.rpm

# ll -i
total 197584
68811855 -rw-r--r--   1 root  root          0 Jul 17 14:01 ?????5e?跖
68811856 -rw-r--r--   1 root  root          0 Jul 17 14:01 ?????5e?跖Ք?d??ݢ??N?9L?]??????l???
68108307 -rw-------.  1 root  root       1115 Sep 27  2016 anaconda-ks.cfg
67908358 -rw-r--r--   1 root  root    8491533 Nov 18  2015 apache-maven-3.3.9-bin.tar.gz
68811857 -rw-r--r--   1 root  root     403873 Jul 17 14:01 ooo-scm-1.3.1.180611-SNAPSHOT.zip
67545987 -rwxr-xr-x   1 root  root        187 Jul  7 14:23 fdisk.sh
67545988 -rw-r--r--   1 root  root  190890122 Apr  4 02:05 jdk-8u171-linux-x64.tar.gz
67546016 -rw-r--r--   1 root  root         49 Jul  7 15:16 mysql.txt
67546011 -rw-r--r--   1 root  root         36 Jul  7 15:15 redis.txt
68782591 drwxr-xr-x  13 50469 users      4096 Jul 11 17:24 tengine-2.1.2
67546020 -rw-r--r--   1 root  root    2137295 Mar  2 10:35 tengine-2.1.2.tar.gz
68388050 -rw-r--r--   1 root  root     365288 Oct 18  2017 zabbix-agent-3.4.3-1.el7.x86_64.rpm
68388055 -rw-r--r--   1 root  root       2750 Jul  9 09:35 zabbix_api.py

# find . -inum 68811855
./?????5e?跖

# find . -inum 68811855|xargs rm -f

# ll -i
total 197584
68811856 -rw-r--r--   1 root  root          0 Jul 17 14:01 ?????5e?跖Ք?d??ݢ??N?9L?]??????l???
68108307 -rw-------.  1 root  root       1115 Sep 27  2016 anaconda-ks.cfg
67908358 -rw-r--r--   1 root  root    8491533 Nov 18  2015 apache-maven-3.3.9-bin.tar.gz
68811857 -rw-r--r--   1 root  root     403873 Jul 17 14:01 ooo-scm-1.3.1.180611-SNAPSHOT.zip
67545987 -rwxr-xr-x   1 root  root        187 Jul  7 14:23 fdisk.sh
67545988 -rw-r--r--   1 root  root  190890122 Apr  4 02:05 jdk-8u171-linux-x64.tar.gz
67546016 -rw-r--r--   1 root  root         49 Jul  7 15:16 mysql.txt
67546011 -rw-r--r--   1 root  root         36 Jul  7 15:15 redis.txt
68782591 drwxr-xr-x  13 50469 users      4096 Jul 11 17:24 tengine-2.1.2
67546020 -rw-r--r--   1 root  root    2137295 Mar  2 10:35 tengine-2.1.2.tar.gz
68388050 -rw-r--r--   1 root  root     365288 Oct 18  2017 zabbix-agent-3.4.3-1.el7.x86_64.rpm
68388055 -rw-r--r--   1 root  root       2750 Jul  9 09:35 zabbix_api.py

# find . -inum 68811856|xargs rm -f

# ll -i
total 197584
68108307 -rw-------.  1 root  root       1115 Sep 27  2016 anaconda-ks.cfg
67908358 -rw-r--r--   1 root  root    8491533 Nov 18  2015 apache-maven-3.3.9-bin.tar.gz
68811857 -rw-r--r--   1 root  root     403873 Jul 17 14:01 ooo-scm-1.3.1.180611-SNAPSHOT.zip
67545987 -rwxr-xr-x   1 root  root        187 Jul  7 14:23 fdisk.sh
67545988 -rw-r--r--   1 root  root  190890122 Apr  4 02:05 jdk-8u171-linux-x64.tar.gz
67546016 -rw-r--r--   1 root  root         49 Jul  7 15:16 mysql.txt
67546011 -rw-r--r--   1 root  root         36 Jul  7 15:15 redis.txt
68782591 drwxr-xr-x  13 50469 users      4096 Jul 11 17:24 tengine-2.1.2
67546020 -rw-r--r--   1 root  root    2137295 Mar  2 10:35 tengine-2.1.2.tar.gz
68388050 -rw-r--r--   1 root  root     365288 Oct 18  2017 zabbix-agent-3.4.3-1.el7.x86_64.rpm
68388055 -rw-r--r--   1 root  root       2750 Jul  9 09:35 zabbix_api.py

你可能感兴趣的:(find 配合 xargs 删除乱码文件的方法)