zoukankan      html  css  js  c++  java
  • 查找特定文件,修改为当前系统时间

     #find . -name '*.rpm' -exec ls -l {} ;
    -rw-r--r-- 1 root root 771236 12月 12 2015 ./123/lftp-4.0.9-1.el6.x86_64.rpm
    -rw-rw-r-- 1 root root 771236 12月 12 2015 ./lftp-4.0.9-1.el6.x86_64.rpm
    -rw-rw-r-- 1 root root 154392 12月 12 2015 ./vsftpd-2.2.2-11.el6.x86_64.rpm

    # find . -name '*.rpm' -exec touch {} ;

    find . -name '*.rpm' -exec ls -l {} ;
    -rw-r--r-- 1 root root 771236 7月  20 16:28 ./123/lftp-4.0.9-1.el6.x86_64.rpm
    -rw-rw-r-- 1 root root 771236 7月  20 16:28 ./lftp-4.0.9-1.el6.x86_64.rpm
    -rw-rw-r-- 1 root root 154392 7月  20 16:28 ./vsftpd-2.2.2-11.el6.x86_64.rpm

    问题:找出目录下的所有软连接并删除

    find . -type -l -exec rm {} ;

    find . -maxdepth 1 -type l -exec ls -l {} ;

  • 相关阅读:
    Vue(五)模板
    2.typescript-你好世界
    1.typescript-安装
    jquery事件冒泡
    jquery中animate的使用
    Python 环境管理
    CentOS yum 源修改
    Node.js
    端口
    CSV
  • 原文地址:https://www.cnblogs.com/jjzd/p/5688891.html
Copyright © 2011-2022 走看看