ram - Trash extremely slow ubuntu 16.04 when used for big files - Ask Ubuntu


i re writing question avoid confusion... on ubuntu 16.04 had delete 6500 files. 50% raw images , 50% associated .xml files. totalling 72gb. using samsung evo ssd 500gb. moved files rash first , deleted them. noticed moving files trash consumed ram (8gb) , swap (8gb). there setting can make trash in ubuntu behave more efficiently? know can force delete files , bypass trash altogether defeats purpose of trash completely. or behaviour expected?

this behavior expected, because when delete using nautilus, moves trash, know.

correction: not expected behavior. bb1 points out, 'moving' file trash doesn't move anywhere, updates it's inode reflect location.

i guess ram being eaten because takes more system resources delete (or with) bunch of small files delete 1 bigger file.

the behavior of trash doesn't appear customizable. there's not done that, unfortunately. trash-cli, don't know if more efficient or not.

when have delete bunch of small files, shell, because it's faster. then, have encountered error while trying delete 100k files, along lines of "rm: argument list long". around that, ran rm in loop , iterated through files like:

for letter in {a..z};do rm -f $letter*;done 

if wanted emulate trash functionality in shell, try this:

#!/bin/bash ## pseudotrash elsewhere=/media/$user/some-external-drive/pseudo-trash file in "$@";do   cp $file $elsewhere   if [ "$?" -eq "0" ] ;     rm -f $file && echo "backed , deleted $file"||\     (echo "could not delete $file , aborting";exit 1)   else     echo "could not copy $file,aborting" ;exit 1   fi done 

and run like:

pseudotrash `ls` 

or

pseudotrash 'file1 file2 file3' 

i hope answers question , offers insight solve problem.


Comments

Popular posts from this blog

download - Firefox cannot save files (most of the time), how to solve? - Super User

windows - "-2146893807 NTE_NOT_FOUND" when repair certificate store - Super User

sql server - "Configuration file does not exist", Event ID 274 - Super User