3 added 316 characters in body
source | link

I don't know of a short way to do so. For this task I use a shell script, you may find useful, too:

 #!/bin/ksh

 if [ $# -eq 0 ]
  then
    set "$PWD"
  fi

 for path in "$@"
  do
   while true
    do
     ls -ld "$path"
     if [ -z "$path" -o "$path" = . -o "$path" = / ]
      then
        break
      fi
     path=$(dirname "$path")
    done
  done

EDIT: Using an until loop omits the need for the break ...

 #!/bin/ksh

 [ $# -eq 0 ] && set "$PWD"

 for path
  do
   until test -z "$path" -o "$path" = . -o "$path" = /
    do
     ls -ld "$path"
     path=$(dirname "$path")
    done
  done

I don't know of a short way to do so. For this task I use a shell script, you may find useful, too:

 #!/bin/ksh

 if [ $# -eq 0 ]
  then
    set "$PWD"
  fi

 for path in "$@"
  do
   while true
    do
     ls -ld "$path"
     if [ -z "$path" -o "$path" = . -o "$path" = / ]
      then
        break
      fi
     path=$(dirname "$path")
    done
  done

I don't know of a short way to do so. For this task I use a shell script, you may find useful, too:

 #!/bin/ksh

 if [ $# -eq 0 ]
  then
    set "$PWD"
  fi

 for path in "$@"
  do
   while true
    do
     ls -ld "$path"
     if [ -z "$path" -o "$path" = . -o "$path" = / ]
      then
        break
      fi
     path=$(dirname "$path")
    done
  done

EDIT: Using an until loop omits the need for the break ...

 #!/bin/ksh

 [ $# -eq 0 ] && set "$PWD"

 for path
  do
   until test -z "$path" -o "$path" = . -o "$path" = /
    do
     ls -ld "$path"
     path=$(dirname "$path")
    done
  done
2 added 6 characters in body
source | link

I don't know of a short way to do so. For this task I use a shell script, you may find useful, too:

 #!/bin/ksh

 if [ $# -eq 0 ]
  then
    set $PWD"$PWD"
  fi

 for path in "$@"
  do
   while true
    do
     ls -ld $path"$path"
     if [ -z "$path" -o "$path" = . -o "$path" = / ]
      then
        break
      fi
     path=$(dirname $path"$path")
    done
  done

I don't know of a short way to do so. For this task I use a shell script, you may find useful, too:

 #!/bin/ksh

 if [ $# -eq 0 ]
  then
    set $PWD
  fi

 for path in "$@"
  do
   while true
    do
     ls -ld $path
     if [ -z "$path" -o "$path" = . -o "$path" = / ]
      then
        break
      fi
     path=$(dirname $path)
    done
  done

I don't know of a short way to do so. For this task I use a shell script, you may find useful, too:

 #!/bin/ksh

 if [ $# -eq 0 ]
  then
    set "$PWD"
  fi

 for path in "$@"
  do
   while true
    do
     ls -ld "$path"
     if [ -z "$path" -o "$path" = . -o "$path" = / ]
      then
        break
      fi
     path=$(dirname "$path")
    done
  done
1
source | link

I don't know of a short way to do so. For this task I use a shell script, you may find useful, too:

 #!/bin/ksh

 if [ $# -eq 0 ]
  then
    set $PWD
  fi

 for path in "$@"
  do
   while true
    do
     ls -ld $path
     if [ -z "$path" -o "$path" = . -o "$path" = / ]
      then
        break
      fi
     path=$(dirname $path)
    done
  done