@__thumb files - How do do I get rid of them?

Don't miss a thing. Post your questions and discussion about other uncategorized NAS features here.
Feybio
Starting out
Posts: 37
Joined: Tue Jul 10, 2012 6:41 pm

Re: @__thumb files - How do do I get rid of them?

Post by Feybio » Fri Apr 29, 2016 3:08 pm

Script worked like a charm...

There is a way to have DLNA Photo function enabled and no thumb generation?
Barebone : Shuttle XPC SZ170R8 v2 CPU: Intel i5 6600k Ram: 16GB Corsair Vengeance SSD: Samsung 960 EVO M2 HDD: WD Green 3TB VGA: GeForce GTX 1080 FE Monitor: DELL 27" FullHD
HTPC : CPU: Intel Core i7 920 Mobo: Gigabyte X58-UD3R Ram: 6GB OCZ 1600 SSD: Intel X25-M 160GB HDD: WD Green 2TB VGA: Sapphire HD 6570 Fanless TV: Panasonic Plasma 50TV30

NAS 1 : TVS-EC1080 E3 8GB - 4.3.4 - 6 x 6TB Western Digital WD60EFRX (RAID 6)
NAS 2 : TS-251+ 8GB - 4.3.4 - 2 x 2TB Western Digital WD20EFRX (RAID 1)
NAS 3 : TS-239 Pro II 2GB - 4.2.6 - 2 x 2TB Samsung HD203WI (RAID 1)

gonart
Starting out
Posts: 13
Joined: Sun Feb 28, 2016 12:11 am

Re: @__thumb files - How do do I get rid of them?

Post by gonart » Sun May 15, 2016 11:39 pm

papampi wrote:I just found a way to completely disable creating .@__thumb folders,
Even if you disable media folders when you open any media folder in file station it will create .@__thumb folder.
So the best way is :

Code: Select all

1- Open file station
2- Top right corner click setting icon (between help and refresh)
3- Uncheck "support multimedia playback and thumbnail display"
4- Voila .... never see   .@__thumb folders again.


I dont know what multimedia playback it disbales, I have no problem playback on kodi


Thanks for posting this solution. Hopefully, in combination with running the Python script the problem will be permanently fixed.

Veloz
New here
Posts: 3
Joined: Sat Jul 18, 2009 12:30 pm

Re: @__thumb files - How do do I get rid of them?

Post by Veloz » Tue May 17, 2016 11:57 am

I'm just going to resurrect this to save anyone else coming across this thread the hassles I had blundering around...

First, if you're going to use one of the Python scripts so generously provided here, you've got to make sure you have the Python QPKG installed and enabled! Seems obvious, but...

Second, to run the command, at your SSH prompt, type:

Code: Select all

python rmthumbnails.py


Don't include the # that you see in some of the other posts.

That should do it... HTH

coofercat
New here
Posts: 8
Joined: Tue Jul 19, 2016 4:42 am

Re: @__thumb files - How do do I get rid of them?

Post by coofercat » Thu Jul 21, 2016 3:52 am

Ahh... more Qnap weirdness... I do wish they'd just do things like everyone else...

To delete the thumb directories, I used this:

ssh admin@nas
(enter admin password)
cd /share/CACHEDEV1_DATA/
(do another cd to one of your shares if you want to)
find . -type d -name '.@__thumb' | while read ITEM; do rm -rf "${ITEM}"; done

That last bit is the dangerous bit - for those not au-fe with Bash, it basically says:

"Look around for directories called .@__thumb and send a list to:
...a loop which will read each line of the 'find' output and put it into a variable called ITEM.
Each iteration of the loop will run a recursive (ie. dangerous) delete on the path in the ITEM variable."

Note: if you've got a directory with a space in the name, you absolutely definitely do need the quotes around "${ITEM}", otherwise you risk deleting things you don't intend. Use at your own risk, you've been warned, etc etc.

Incidentally, on my TS-453A, I can't find any candidate cron jobs, so we'll see if the files come back tonight.

paleosonic
Starting out
Posts: 17
Joined: Sun Jul 24, 2016 6:30 pm

Re: @__thumb files - How do do I get rid of them?

Post by paleosonic » Tue Aug 02, 2016 7:45 pm

Are there no developers watching these topics?
I can't believe they never thought of changing the cache system.

Using "hidden" cache folders all over the file system is so Windows 98!
Imagine every silly program would leave it's droppings in your folders?

Smart people discovered the use of centralized storage for meta-data.
A MySQL or sqlite database or even a plain cache folder would be a neat solution.

ja666
Know my way around
Posts: 179
Joined: Sat Nov 29, 2014 5:21 pm

Re: @__thumb files - How do do I get rid of them?

Post by ja666 » Wed Dec 28, 2016 7:42 pm

coofercat wrote:To delete the thumb directories [...]
I use Total Commander from Windows machine, TC sees easily all of the QNAP @__thumb directories, simply find them all (search @__thumb), mark them all (list and select from top to bottom), delete them all in one step if you wish (shift-del), 30 seconds job.

User avatar
Moogle Stiltzkin
Ask me anything
Posts: 9389
Joined: Thu Dec 04, 2008 12:21 am
Location: Around the world....
Contact:

Re: @__thumb files - How do do I get rid of them?

Post by Moogle Stiltzkin » Thu Jun 29, 2017 3:54 pm

ja666 wrote:
coofercat wrote:To delete the thumb directories [...]
I use Total Commander from Windows machine, TC sees easily all of the QNAP @__thumb directories, simply find them all (search @__thumb), mark them all (list and select from top to bottom), delete them all in one step if you wish (shift-del), 30 seconds job.


i could not see @__thumb using TC. May i know how you did that? i tried search but none were found. yet technical support was able to show from commandline the existence of those __thumb with a total file size roughly between 200-300mb.

Also after a hbs rtrr found out a files/folder discrepancy which was due to those thumbnails. so i want to delete them using tc method but i can't find them :shock:


coofercat wrote:Ahh... more Qnap weirdness... I do wish they'd just do things like everyone else...

To delete the thumb directories, I used this:

ssh admin@nas
(enter admin password)
cd /share/CACHEDEV1_DATA/
(do another cd to one of your shares if you want to)
find . -type d -name '.@__thumb' | while read ITEM; do rm -rf "${ITEM}"; done

That last bit is the dangerous bit - for those not au-fe with Bash, it basically says:

"Look around for directories called .@__thumb and send a list to:
...a loop which will read each line of the 'find' output and put it into a variable called ITEM.
Each iteration of the loop will run a recursive (ie. dangerous) delete on the path in the ITEM variable."

Note: if you've got a directory with a space in the name, you absolutely definitely do need the quotes around "${ITEM}", otherwise you risk deleting things you don't intend. Use at your own risk, you've been warned, etc etc.

Incidentally, on my TS-453A, I can't find any candidate cron jobs, so we'll see if the files come back tonight.


this worked for me :mrgreen:
NAS
[Main Server] QNAP TS-877 w. 4tb [ 3x HGST Deskstar NAS (HDN724040ALE640) & 1x WD RED NAS ] EXT4 Raid5 & 2 x m.2 SATA Samsung 850 Evo raid1 +16gb ddr4 Crucial+ QWA-AC2600 wireless+QXP PCIE
[Backup] QNAP TS-653A w. 5x 2TB Samsung F3 (HD203WI) EXT4 Raid5
[Backup] QNAP TL-D400S 2x 4TB WD Red Nas (WD40EFRX) single disks.
[^] QNAP TS-659 Pro II
[^] QNAP TS-509 Pro w. 4x 1TB WD RE3 (WD1002FBYS) EXT4 Raid5
[^] QNAP TS-228
[^] QNAP TS-128
[Mobile NAS] TBS-453DX w. 2x Crucial MX500 500gb EXT4 raid1

Network
Asus AC68U Router|100dl/50ul MBPS FTTH Internet | Win10, WC PC-Intel i7 920 Ivy bridge desktop (1x 512gb Samsung 850 Pro SSD + 1x 4tb HGST Ultrastar 7K4000)


Guides & articles
[Review] Moogle's QNAP experience
[Review] Moogle's TS-877 review
https://www.patreon.com/mooglestiltzkin

ja666
Know my way around
Posts: 179
Joined: Sat Nov 29, 2014 5:21 pm

Re: @__thumb files - How do do I get rid of them?

Post by ja666 » Sat Jul 08, 2017 2:25 pm

Have no idea... I have Total Commander Configuration -> Display -> File display -> Show hidden/system files switched on (as also 'show hidden/system files' with my Windows configuration).

-----
Moogle Stiltzkin wrote:May i know how you did that?

User avatar
Moogle Stiltzkin
Ask me anything
Posts: 9389
Joined: Thu Dec 04, 2008 12:21 am
Location: Around the world....
Contact:

Re: @__thumb files - How do do I get rid of them?

Post by Moogle Stiltzkin » Sat Jul 08, 2017 2:35 pm

ja666 wrote:Have no idea... I have Total Commander Configuration -> Display -> File display -> Show hidden/system files switched on (as also 'show hidden/system files' with my Windows configuration).

-----
Moogle Stiltzkin wrote:May i know how you did that?


thx :)
NAS
[Main Server] QNAP TS-877 w. 4tb [ 3x HGST Deskstar NAS (HDN724040ALE640) & 1x WD RED NAS ] EXT4 Raid5 & 2 x m.2 SATA Samsung 850 Evo raid1 +16gb ddr4 Crucial+ QWA-AC2600 wireless+QXP PCIE
[Backup] QNAP TS-653A w. 5x 2TB Samsung F3 (HD203WI) EXT4 Raid5
[Backup] QNAP TL-D400S 2x 4TB WD Red Nas (WD40EFRX) single disks.
[^] QNAP TS-659 Pro II
[^] QNAP TS-509 Pro w. 4x 1TB WD RE3 (WD1002FBYS) EXT4 Raid5
[^] QNAP TS-228
[^] QNAP TS-128
[Mobile NAS] TBS-453DX w. 2x Crucial MX500 500gb EXT4 raid1

Network
Asus AC68U Router|100dl/50ul MBPS FTTH Internet | Win10, WC PC-Intel i7 920 Ivy bridge desktop (1x 512gb Samsung 850 Pro SSD + 1x 4tb HGST Ultrastar 7K4000)


Guides & articles
[Review] Moogle's QNAP experience
[Review] Moogle's TS-877 review
https://www.patreon.com/mooglestiltzkin

User avatar
Spider99
Experience counts
Posts: 1946
Joined: Fri Oct 21, 2011 11:14 pm
Location: UK

Re: @__thumb files - How do do I get rid of them?

Post by Spider99 » Sat Jul 08, 2017 3:56 pm

@Moogle

If you want to make the thumb dir visible you can do this by editing the \etc\smb.conf file and removing .@__thumb from the veto file list

IIRC smb.conf gets overwritten at boot or samba restart - so you can also edit \etc\default_config\smb.conf as well

I did this awhile ago but it made the directories visible in windows explorer so easy to find and delete
Tim

TS-853A(16GB): - 4.3.4.0483 - Static volume - Raid5 - 8 x 4TB HGST Deskstar NAS
Windows Server + StableBit Drivepool and Scanner ~115 TB Backup Server
TS-412 & TS-459 Pro II: Retired
Clients: 3 x Windows 10 Pro(64bit)

User avatar
Moogle Stiltzkin
Ask me anything
Posts: 9389
Joined: Thu Dec 04, 2008 12:21 am
Location: Around the world....
Contact:

Re: @__thumb files - How do do I get rid of them?

Post by Moogle Stiltzkin » Sat Jul 08, 2017 5:37 pm

Spider99 wrote:@Moogle

If you want to make the thumb dir visible you can do this by editing the \etc\smb.conf file and removing .@__thumb from the veto file list

IIRC smb.conf gets overwritten at boot or samba restart - so you can also edit \etc\default_config\smb.conf as well

I did this awhile ago but it made the directories visible in windows explorer so easy to find and delete


oo thats useful. yep makes things far easier :) thx
NAS
[Main Server] QNAP TS-877 w. 4tb [ 3x HGST Deskstar NAS (HDN724040ALE640) & 1x WD RED NAS ] EXT4 Raid5 & 2 x m.2 SATA Samsung 850 Evo raid1 +16gb ddr4 Crucial+ QWA-AC2600 wireless+QXP PCIE
[Backup] QNAP TS-653A w. 5x 2TB Samsung F3 (HD203WI) EXT4 Raid5
[Backup] QNAP TL-D400S 2x 4TB WD Red Nas (WD40EFRX) single disks.
[^] QNAP TS-659 Pro II
[^] QNAP TS-509 Pro w. 4x 1TB WD RE3 (WD1002FBYS) EXT4 Raid5
[^] QNAP TS-228
[^] QNAP TS-128
[Mobile NAS] TBS-453DX w. 2x Crucial MX500 500gb EXT4 raid1

Network
Asus AC68U Router|100dl/50ul MBPS FTTH Internet | Win10, WC PC-Intel i7 920 Ivy bridge desktop (1x 512gb Samsung 850 Pro SSD + 1x 4tb HGST Ultrastar 7K4000)


Guides & articles
[Review] Moogle's QNAP experience
[Review] Moogle's TS-877 review
https://www.patreon.com/mooglestiltzkin

MacQwigg
Starting out
Posts: 12
Joined: Tue Jun 09, 2009 11:55 pm

Re: @__thumb files - How do do I get rid of them?

Post by MacQwigg » Tue Sep 12, 2017 4:40 pm

If you have hundreds, if not thousands, of folders, deleting every .@__thumb is extremely time consuming! So what I did was to automate this with findutils!

My process:
1. Open you browser -> go to QTS -> Control Panel -> Applications -> Multimedia Management -> Media library.
2. Switch Scan Settings to Manual and click Deactivate Media Library.
3. Go to File Station and in the right top corner, click Settings", and make sure support multimedia Playback and thumbnails display is unticked.

Now to the more difficult part. Make sure that you have installed optware or entware. Entware is what I'm using and you can get it here: https://github.com/Entware-ng/Entware-ng/wiki/Install-on-QNAP-NAS

4. ssh into your nas and run the following commands:

Code: Select all

opkg update
opkg upgrade
opkg install findutils


Now it's time to run the commands that will:
I. Delete all folders named ".@__thumb" and all files/folders inside it.
II. Delete all "Thumbs.db" files.

5. Run the commands below by turn.

Code: Select all

/opt/bin/find / -name ".@__thumb" -exec rm -r '{}' \;
/opt/bin/find / -name "Thumbs.db" -delete

If you are not comfortable with the command searching the whole NAS, simply change the command to:

Code: Select all

/opt/bin/find /FOLDER/YOU/WANT/TO/SEARCH/IN -THE REST OF THE COMMAND
Ex: /opt/bin/find /share/HDA_DATA/Multimedia/Pictures -THE REST OF THE COMMAND

You'll probably get the error: "No such file or directory" which is perfectly fine! Now, check some folders just to see if the folder and files are removed!

Just a heads-up: ".@__thumb" folders and "Thumbs.db" files will probably be created later after QTS Firmware upgrade or simply by using File Station, so run the commands again if you see that the files are back. I recommend to avoid the use of File Station as it might create them too. There are better, faster and way easier alternatives like direct access via shell, Qfile etc.

QTS: 4.3.3.0299 build 20170901

Ps: If you want to use optware instead of entware, simply use ipkg instead of opkg.

jstore
Getting the hang of things
Posts: 73
Joined: Sun May 22, 2016 10:12 pm

Re: @__thumb files - How do do I get rid of them?

Post by jstore » Thu Sep 14, 2017 10:18 pm

coofercat wrote:Ahh... more Qnap weirdness... I do wish they'd just do things like everyone else...

To delete the thumb directories, I used this:

ssh admin@nas
(enter admin password)
cd /share/CACHEDEV1_DATA/
(do another cd to one of your shares if you want to)
find . -type d -name '.@__thumb' | while read ITEM; do rm -rf "${ITEM}"; done

That last bit is the dangerous bit - for those not au-fe with Bash, it basically says:

"Look around for directories called .@__thumb and send a list to:
...a loop which will read each line of the 'find' output and put it into a variable called ITEM.
Each iteration of the loop will run a recursive (ie. dangerous) delete on the path in the ITEM variable."

Note: if you've got a directory with a space in the name, you absolutely definitely do need the quotes around "${ITEM}", otherwise you risk deleting things you don't intend. Use at your own risk, you've been warned, etc etc.

Incidentally, on my TS-453A, I can't find any candidate cron jobs, so we'll see if the files come back tonight.


Thanks, coofercat. This worked great for me. And your warning is key for anyone thinking of giving this a try. I tested my syntax by substituting "ls" for the "rm -rf" to be sure no typos.

bighugesumo
Starting out
Posts: 42
Joined: Thu Apr 16, 2015 2:03 am

Re: @__thumb files - How do do I get rid of them?

Post by bighugesumo » Fri Oct 06, 2017 5:24 pm

sushi17 wrote:this works too from SSH

Code: Select all

rm -rf /share/Qmultimedia/*/.@__thumb
rm -rf /share/Qmultimedia/*/*/.@__thumb
rm -rf /share/Qmultimedia/*/*/*/.@__thumb
rm -rf /share/Qmultimedia/*/*/*/*/.@__thumb
rm -rf /share/Qmultimedia/*/*/*/*/*/.@__thumb


and it's easier


YOU DA MAN!

Post Reply

Return to “Miscellaneous”