You are not logged in.
I'm trying to find a command that will list all files in a directory (and sub directories) as long as the directories aren't hidden (so directories that don't start with a .)
I'm trying to make a script that will sort all files in my computer, all '.txt' files in a folder called 'txt' etc. but i don't want it to access the files that start with a .
This is what i have so far as a command
x=$(find * -type d | grep -v '\.' | sed 's/\ /\\ /g' | sed 's/(/\\(/' | sed 's/)/\\)/' | sed 's/$/\ \n/') && ls $x
this works but there are issues with files that have ' ' within them, i've tried some other things but i feel like there is a much better way to do this
to sum up i just want a command that will list all files recursively within directories that aren't hidden
SOLUTION:
ls -R
-_-
Last edited by MrFlacko (2019-05-02 12:53:18)
Offline
"ls -R"?
Offline
"ls -R"?
I want to do that bot only to folders that don't start with a '.'
EDIT
FFS I CAN'T BELIEVE I OVERLOOKED THAT
i'll close this post
Last edited by MrFlacko (2019-05-02 12:51:10)
Offline
-R should™ ignore hidden directories,
type lsOffline