Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-17-2007 10:26 AM
тАО04-17-2007 10:26 AM
printf
abcd@xyz:~> find /tmp -printf %m -maxdepth 0 | grep 1777
1777
How can I achieve this in HP-UX 11.11? Thanks in advance.
- Tags:
- find
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-17-2007 10:45 AM
тАО04-17-2007 10:45 AM
Re: printf
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-17-2007 10:51 AM
тАО04-17-2007 10:51 AM
Re: printf
http://hpux.its.tudelft.nl/hppd/hpux/Gnu/findutils-4.2.28/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-17-2007 11:08 AM
тАО04-17-2007 11:08 AM
Re: printf
like 1777 etc..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-17-2007 11:29 AM
тАО04-17-2007 11:29 AM
Re: printf
There is -depth option.
I assume -printf %m prints the mode? To do that, you need:
$ find /tmp -exec ll + | grep "^lrwxrwxrwx"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-17-2007 11:39 AM
тАО04-17-2007 11:39 AM
Re: printf
> Is there any command/syntax through which I can get the permission of a file or directory in the number format?
# perl -le '$f=shift;printf("%04o %-s\n",(stat($f))[2] & 07777,$f)' file
Regards!
...JRF...
- Tags:
- Perl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-17-2007 12:51 PM
тАО04-17-2007 12:51 PM
Re: printf
Since you began this query with the piped output of 'find', here's another Perl variation that you can use in a pipeline:
# find /path -type f -print|perl -nle '{printf("%04o %-s\n",(stat($_))[2] & 07777,$_)}'
...OR (better yet) do everything in Perl:
# perl -MFile::Find -le 'find(sub{printf("%04o %-s\n",(stat($_))[2] & 07777,$File::Find::name)},@ARGV)' /path
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-17-2007 05:36 PM
тАО04-17-2007 05:36 PM
Re: printf
ls -ld /tmp | grep "^drwxrwxrwt"