Not logged in. · Lost password · Register
Forum: General Help and Support Features and Functionality RSS
Get a list of pages by size?
Avatar
raksasas #1
Member since Feb 2017 · 11 posts · Location: Central Texas
Group memberships: Members
Show profile · Link to this post
Subject: Get a list of pages by size?
I am looking for a way to get a list with each page's size is this possible?  Ideally I would like to able able to have a list of the top XX (50) pages sorted by largest to smallest in mb/kb.
Avatar
MartinR #2
Member since Jul 2015 · 155 posts · Location: UK
Group memberships: Members
Show profile · Link to this post
Try:
$ cd <dokuwiki_root>/pages
$ find * -printf "%8s %p\n" | sort -nr | head -50
Size is in bytes, you may need to increase the "8" if you have particularly large files.  Output shows the relative path from the pages directory.  You can try messing about with ''-type'' on the ''find' command to further select; ''-type f'' will restrict the output to regular files only for example.  TIP: don't miss out the ''\n'' from the format statement or you will get just one long line with every file in it!  8-(
Avatar
StarArmy #3
Member since Nov 2011 · 102 posts
Group memberships: Members
Show profile · Link to this post
Hmm, we need some way to do this in the GUI. It would really help find and remove pages with no content (Where someone has saved only a space character, or perhaps an unifnished page with only headers and no content).
Avatar
MartinR #4
Member since Jul 2015 · 155 posts · Location: UK
Group memberships: Members
Show profile · Link to this post
Doing it in the GUI would require a plugin of some sort.  If you can put up with the command line changing
sort -nr
to
sort -n
will give you the smallest files.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2019-10-16, 06:58:45 (UTC +02:00)