Question

I would like to list all files in a certain directory, and list them with their full path.

I have a series of directories like this:

user.newskims.131017222704/
user.newskims.131017222741/
user.newskims.131017222822/
user.newskims.131017222949/

If I do

ls user.newskims.131017222*

The output has lines like this which I want to eliminate:

user.newskims.131017222822:

It also doesn't give the full path. Is there a way to make it list all of the files inside, and only those files and no additional rows, and with the full path?

Was it helpful?

Solution

You can list file with full path of a given directory using printf:

printf "$PWD%s\n" user.newskims.131017222/*
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top