Unix ls command: show full path when using options

前端 未结 8 1712
故里飘歌
故里飘歌 2020-12-07 12:13

I often use this list command in Unix (AIX / KSH):

ls -Artl

It displays the files as this:

-rw-r--r-- 1 myuser mygroup 0 Apr 2

8条回答
  •  忘掉有多难
    2020-12-07 12:48

    I wrote a shell script called fullpath that contains this code, use it everyday:

        #!/bin/sh
        for i in $* ; do
            echo $(pwd)/$i
        done
    

    Put it somewhere in your PATH, and make it executable(chmod 755 fullpath) then just use
    fullpath file_or_directory

提交回复
热议问题