bug-fileutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: get file mode


From: Bob Proulx
Subject: Re: get file mode
Date: Tue, 26 Nov 2002 10:41:02 -0700
User-agent: Mutt/1.4i

Zanette Arrigo <address@hidden> [2002-11-25 16:14:15 +0100]:

> There is a way to get the file mode (octal or text)?

Sounds like you are looking for:

  ls -ld file | awk '{print$1}'

Putting it into a variable.

  filemode=$(ls -ld file | awk '{print$1}')

Bob




reply via email to

[Prev in Thread] Current Thread [Next in Thread]