Operating System - HP-UX
1752812 Members
6279 Online
108789 Solutions
New Discussion юеВ

Re: Getting the full path

 
SOLVED
Go to solution
Manuales
Super Advisor

Getting the full path

How to get the full path of a file when i run "ls"?
5 REPLIES 5
James R. Ferguson
Acclaimed Contributor
Solution

Re: Getting the full path

Hi Manuales:

Specify the absolute pathname for a single file:

# ls -l /etc/rc.config.d/netconf

...or for directory searches:

# find /etc/rc.config.d -type f -exec ls -ld {} +

Regards!

...JRF...
Tingli
Esteemed Contributor

Re: Getting the full path

ls $PWD/*
Manuales
Super Advisor

Re: Getting the full path

how do you avoid getting directories names in the output?
i only need the files....

James R. Ferguson
Acclaimed Contributor

Re: Getting the full path

Hi (again) Manuales:

> how do you avoid getting directories names in the output?
i only need the files....

That's why I used '-type f' with the 'find()'.

Regards!

...JRF...
Mike Miller_8
Regular Advisor

Re: Getting the full path

ls -l -p | grep -v \/