Hi!
I'd like to list my files recursively BUT:
I want them in this format, so that I can use them as options for commands like ftp->put or del
./directory1/file1.tar
./directory1/file2.tar
./directory1/file3.tar
./directory2/file1.tar
./directory2/file2.tar
./directory2/file3.tar
./directory2/file4.tar
Is there any option with ls or is there another command to do this??
I beleive that you will need to use wildcards in your search portion of the ls statement.
As follows:
cd /
ls -la /*/* |awk '{ print $NF }' > /path/to/file # $NF will print the last field always so that you can get the filename intact with full path.
This will recursively list down 1 directory from the current directory. However, this will not do subsequent subdirectories. you will need to add a /* for each additional subdirectory and append that to the file you created with previous ls statements.
ls -la /* |awk ... > /path/to/file
ls -la /*/* | awk ... >> /path/to/file # append to first output.
ls -la /*/*/* | awk ... >> /path/to/file # and append again.
etc... ... ...
And the -a option will sort by alpha order as well. It will also pipe throught awk so that only the full path is listed and not file information.
There is another way but it does not show the full path.
ls -Rla |pg
This only shows a directory then the actual filename under that directory, not the full path as you requested.

Just use:
find . -name '*'
This will find all files from the point of execution downwards - and display the filepath and name from that same point.
You can change the fullstop (after find) to be any place in the filesystem....
I've got no idea, what the hell is up with that system, however pg and awk and find do not work. It only says:
bash: awk: command not found
bash: pg: command not found
bash: find: command not found
I'm not working on a local unix machine. I use SSH. Could it be that these commands are blocked for SSH??
Or do I probably run the wrong shell
By the way:
man doesn't work either!
A few questions.
Unless there are very restrictive, special settings, you should at least be able to use man and find. That is very strange indeed.
Are you root on this session or a normal user?
Is your PATH set to see those directories?
If you want to change your shell just type "ksh" at the prompt. Then type exit to quit the shell. You might check with the SA to see what the settings are for this system.
Quick check to see if they're inyour path...is "which find"
This will tell you where it is - if it's in your path. If it can't find it (which I suspect) then it's not in your path and needs to be added.
Oh man!!
typing "which find"
bash: which: command not found
typing "ksh"
bash: ksh: command not found
I got no clue!!
This is the content of my bin! THis is why find is not in there!
But is there the possibility that someone could send me the 'find' file and that I could execute it in my home dir with
. find [options]
Thank you for the help!
bash*
bc*
bzip2*
cat*
chmod*
clear*
cp*
date*
ddate*
dircolors*
echo*
egrep*
false*
fetchmail*
fgrep*
finger*
ftp*
gawk*
gpg*
gpgv*
grep*
gunzip*
gzip*
head*
hostname*
htpasswd*
id*
joe*
less*
links*
ls*
lynx*
mc*
mcedit*
md5sum*
mkdir*
more*
mutt*
mutt_dotlock*
mv*
mysql*
mysqldump*
mysqlshow*
noshell*
passwd*
pgp@
pgpewrap*
pgpring*
pico*
pine*
pomoc*
ps*
pwd*
rar*
rm*
rmdir*
rvim@
scp*
sed*
sleep*
sort*
tail*
talk*
tar*
touch*
tr*
true*
tty*
uniq*
unrar*
unzip*
vacation.pl*
vi@
vim@
w@
wc*
who*
zip*
I think we need to take a BIG step backwards.
It appears that you are either running an old version of UNIX OS or you have a stripped down version.
Please show us what version of the UNIX OS you are running, that should help a great deal.
I believe that your "problem" lies with the OS version, not having the latest version could be the reason you dont have all the commands. Although it must be a rather old version of UNIX for this to be the case. Someone else in my office has a few boxes that don't have several commands because their OS is 10 years old, a version of BSD.

It may be something quirky - i..e the commands are stored somewhere else. I was going to suggest using 'find' to locate them....but that won't help! You shuold have a around for these at some other location.... then add that location to your path.
They may of course not be there...either as KM has suggested an older or different version - or because some fool deleted them!