![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Getting rid of files with no ownership | kermit | UNIX for Dummies Questions & Answers | 1 | 12-16-2008 12:28 AM |
| Why the cp keeps the original ownership? | freelong | Shell Programming and Scripting | 1 | 09-25-2008 02:09 AM |
| 100% ownership to files | Terrible | UNIX for Dummies Questions & Answers | 3 | 12-05-2006 01:40 PM |
| help regarding file ownership | amit007 | Shell Programming and Scripting | 5 | 09-07-2005 06:42 AM |
| ownership of files | szhu | UNIX for Dummies Questions & Answers | 4 | 12-31-2003 12:59 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Get ownership info from LS
Hi,
When I do the ls-ld command for example like this: # ls -ld /Applications I get an output like this: drwxrwxr-x+ 114 root admin 3876 18 Aug 14:04 /Applications I need to somehow use sed to put the ownership into a format like this: root:admin So basically remove everything in the string except for "root admin" and then replace the 2 spaces (I think? It might be one, not sure) between root and admin with a colon. And this needs to work for users other than root/admin, for stuff like this too: drwx------+ 18 pcwiz staff 612 19 Aug 16:26 /Users/pcwiz/Desktop Thanks |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|