- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- ls command ... getting full path.
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
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
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-25-2011 03:43 PM
тАО01-25-2011 03:43 PM
how can i do to get this information when i
use the command ls:
i am located in
pwd
/data/users/files/
the normal out is:
ls -lat:
-rw-r--r-- 1 508 dba 4274 Dec 15 2009 testfile.txt
i wat to get the out as follows:
-rw-r--r-- 1 508 dba 4274 Dec 15 2009 /data/users/files/testfile.txt
if you see, i want to get the out with the full path where the file name is.
how can i get that?
thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-25-2011 04:10 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-25-2011 04:16 PM
тАО01-25-2011 04:16 PM
Re: ls command ... getting full path.
If you need list a specific filename:
#find /data/users/files/ -name testfile.txt -type f -exec ls -l {} \;
For detailed info about "find" and "ls" commands:
#man find
#man ls
Rgds.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-25-2011 05:49 PM
тАО01-25-2011 05:49 PM
Re: ls command ... getting full path.
if i do this:
$ find /data/users/files/ -name * -type f -exec ls -l {} \;
find: missing conjunction
$ find /data/users/files/ -name *.* -type f -exec ls -l {} \;
find: missing conjunction
$
it is not working .. i want to display all the files with full path under the directory /data/users/file , how can i do that?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-25-2011 06:15 PM
тАО01-25-2011 06:15 PM
Re: ls command ... getting full path.
> $ find /data/users/files/ -name *.* [...]
You might try quoting the wildcards:
find /data/users/files/ -name '*' [...]
find /data/users/files/ -name '*.*' [...]
But, if you want all the files, then why use
_any_ "-name" option?
To see what "find" saw:
echo *
echo *.*
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-25-2011 06:34 PM
тАО01-25-2011 06:34 PM
Re: ls command ... getting full path.
This will provide what you want:
ls -d $PWD/*
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-25-2011 07:23 PM
тАО01-25-2011 07:23 PM