List file using ls command in Linux with full path

前端 未结 13 1687
星月不相逢
星月不相逢 2020-12-24 01:02

Many will found that this is repeating questions but i have gone through all the questions before asked about this topic but none worked for me.

I want to print full

13条回答
  •  天命终不由人
    2020-12-24 01:29

    You could easily use the following to list only files:

    ls -d -1 $PWD/*.*
    

    the following to list directories:

    ls -d -1 $PWD/**
    

    the following to list everything (files/dirs):

    ls -d -1 $PWD/**/*
    

    More helpful options:

    -d list directories not their content

    -R recursive

    -1 list one file per line

    -l use long listing format

    -a list all including entries starting with . and ..

    -A list all but don't list implied . and ..

    for more info, just type the following

    ls --help 
    

提交回复
热议问题