HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: show selected column
Operating System - HP-UX
1838469
Members
3115
Online
110126
Solutions
Forums
Categories
Company
Local Language
back
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
Discussions
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
07-31-2006 01:44 PM
07-31-2006 01:44 PM
show selected column
I want to use ll or ls to show the file info. , how can I select specify info of the file ?
for example ,
$ll ww
-rw-r--r-- 1 edp_ora edp 34 Sep 26 2005 testfile
If I only want to show the group or file only , what can I do ? thx
for example ,
$ll ww
-rw-r--r-- 1 edp_ora edp 34 Sep 26 2005 testfile
If I only want to show the group or file only , what can I do ? thx
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2006 01:48 PM
07-31-2006 01:48 PM
Re: show selected column
do
$ll|awk '{print $9}' to see the filename
$ll|awk '{print $4}' to see the group
you can have similar combinations to view each field is represented by "$" starting from 1 to 9
$ll|awk '{print $9}' to see the filename
$ll|awk '{print $4}' to see the group
you can have similar combinations to view each field is represented by "$" starting from 1 to 9
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2006 01:51 PM
07-31-2006 01:51 PM
Re: show selected column
Hi nash11,
# ls -l | cut -f2
for file owner's group
# ls
gives filename alone.
# man cut
for more info.
PCS
# ls -l | cut -f2
for file owner's group
# ls
gives filename alone.
# man cut
for more info.
PCS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2006 02:39 PM
07-31-2006 02:39 PM
Re: show selected column
Should be:
# ls -l | sed 's/ */ /g' | cut -f4 -d" "
But:
# ls -l | awk '{print $4}'
# ls -l | perl -nea 'print "F[3]\n"'
are more succinct.
PCS
# ls -l | sed 's/ */ /g' | cut -f4 -d" "
But:
# ls -l | awk '{print $4}'
# ls -l | perl -nea 'print "F[3]\n"'
are more succinct.
PCS
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP