Many will found that this is repeating questions but i have gone through all the questions before asked about this topic but none worked for me.
I want to print full
This prints all files, recursively, from the current directory.
find "$PWD" | awk /.ogg/ # filter .ogg files by regex
find "$PWD" | grep .ogg # filter .ogg files by term
find "$PWD" | ack .ogg # filter .ogg files by regex/term using https://github.com/petdance/ack2
How about:
du -a [-b] [--max-depth=N]
That should give you a file and directory listing, relative to your current location. You will get sizes as well (add the '-b' parameter if you want the sizes in bytes). The max-depth parameter may be necessary to "encourage" du to dive deeply enough into your file structure -- or to keep it from getting carried away.
YMMV!
-101-
You can use
ls -lrt -d -1 "$PWD"/{*,.*}
It will also catch hidden files.
You can try this:
ls -d $PWD/*
For listing everything with full path, only in current directory
find $PWD -maxdepth 1
Same as above but only matches a particular extension, case insensitive (.sh files in this case)
find $PWD -maxdepth 1 -iregex '.+\.sh'
$PWD is for current directory, it can be replaced with any directory
mydir="/etc/sudoers.d/" ; find $mydir -maxdepth 1
maxdepth
prevents find from going into subdirectories, for example you can set it to "2" for listing items in children as well. Simply remove it if you need it recursive.
To limit it to only files, can use -type f
option.
find $PWD -maxdepth 1 -type f
The ls
command will only print the name of the file in the directory. Why not do something like
print("/mnt/mediashare/net/192.168.1.220_STORAGE_1d1b7/" + i)
This will print out the directory with the filename.