How to print file permission?

Discussion in 'HOWTO-Related Questions' started by xactto, Jun 6, 2008.

  1. xactto

    xactto New Member

    yes,yes, you think ls -l

    well the unix way is small utilities doing things so you can like
    chmod 777 file

    but what is the reverse equivalent utility to give me 777
    getmod file

    i can't find one.......surely there is one?
  2. falko

    falko Super Moderator ISPConfig Developer

    Try this:
    stat -c %a [I]file[/I]
    or this:
    find [I]file[/I] -prune -printf '%m\n'

Share This Page