- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- list file problem
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
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
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
01-03-2008 01:18 AM
01-03-2008 01:18 AM
list file problem
./test1.txt
./test2.txt
./test3.txt
my desired output is
test1.txt
test2.txt
test3.txt
ps. I must use this command ls -lt ./*
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2008 01:35 AM
01-03-2008 01:35 AM
Re: list file problem
#ls -lt ./* -exec ls {} \; | cut -c 3-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2008 01:38 AM
01-03-2008 01:38 AM
Re: list file problem
You can use strem editor sed in your case with ls command.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2008 01:59 AM
01-03-2008 01:59 AM
Re: list file problem
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1185161
$ ls -lt ./* | sed 's: \./: :'
Note if there are subdirectories in ".", you'll list them too, unless you add -d.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2008 04:35 AM
01-03-2008 04:35 AM
Re: list file problem
Why? Would "ls -lt *" (or better, "ls -lt")
be too easy?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2008 08:30 AM
01-03-2008 08:30 AM
Re: list file problem
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2008 02:27 PM
01-03-2008 02:27 PM
Re: list file problem
I assume you want the rest of the line too?
-rw-rw-r-- 1 uuu ggg 73728 Jan 3 13:55 test1.txt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2008 01:23 AM
01-04-2008 01:23 AM
Re: list file problem
use ls -lt only or ls -lt ./*|awk '{sub("./","");print}'
HTH,
Art