View Single Post
Old 08-05-2020, 10:32 PM   #36
haertig
Wizard
haertig ought to be getting tired of karma fortunes by now.haertig ought to be getting tired of karma fortunes by now.haertig ought to be getting tired of karma fortunes by now.haertig ought to be getting tired of karma fortunes by now.haertig ought to be getting tired of karma fortunes by now.haertig ought to be getting tired of karma fortunes by now.haertig ought to be getting tired of karma fortunes by now.haertig ought to be getting tired of karma fortunes by now.haertig ought to be getting tired of karma fortunes by now.haertig ought to be getting tired of karma fortunes by now.haertig ought to be getting tired of karma fortunes by now.
 
Posts: 1,972
Karma: 35130024
Join Date: Sep 2017
Device: PW3, Galaxy Tab A9+, Galaxy S25FE
Quote:
Originally Posted by droopy View Post
find . -type f -ls | cut -c48- | sort -rn | sed -e 's/\\//g' | pg
bash: pg: command not found

Is there a way to do this while ignoring the file extensions I've checked already (epub, cbz, mobi, pdf, db, etc)?
Code:
find . -type f -ls | egrep -v '\.(epub|cbz|mobi|pdf|db)' | cut -c48- | sort -rn | sed -e 's/\\//g' | more
Notice now I am using the "more" command rather than the "pg" command. They basically do the same thing. Note that with "more" you use the spacebar to advance a page, rather than enter key like you do with "pg". On Linux distros, you will usually find either the pg command or the more command installed, usually both. In your case, you don't have pg. So use more instead.

Nore: The -v option to the egrep command means "everything except". So the above command will list everything except epub's, cbz's, mobi's, pdf's and db's

Last edited by haertig; 08-05-2020 at 10:36 PM.
haertig is offline   Reply With Quote