zoukankan      html  css  js  c++  java
  • linux shell 获取文件夹全文绝对路径

    在ls中列出文件的绝对路径

    ls | sed "s:^:`pwd`/:"

    # 就是在每行记录的开头加上当前路径

    ps:

    #在所有行之前/后加入某个字符串

    sed 's/^/string/g' file
    
    sed 's/$/string/g' file
    
    find  $PWD -maxdepth 1  | xargs ls -ld

    # 列出当前目录下的所有文件(包括隐藏文件)的绝对路径, 对目录不做递归

    find  $PWD | xargs ls -ld

    # 递归列出当前目录下的所有文件(包括隐藏文件)的绝对路径

  • 相关阅读:
    pm2
    php 基础知识
    EBADF, read
    php apache
    noah
    ejs
    node linux
    枚举系统进程
    c++ 进程权限的提升
    Liunx的目录结构
  • 原文地址:https://www.cnblogs.com/a00ium/p/10867331.html
Copyright © 2011-2022 走看看