How i can shred multiple directory existing in text file using bleachbit?

How i can shred multiple directory existing in text file using bleachbit i try this command line
but it does not work

sudo bleachbit -s  $(cat ~/Desktop/scan.txt)

What is ‘~i’? Fix your cat command that it actually works by itself.

sorry is just typing mistake

You probably need to have files on a single line.

cat ~/Desktop/scan.txt | xargs

it does not work too

xargs -a ~/Desktop/scan.txt -0 _command_to_run_
should also work - from my understanding reading the xargs manual page

xargs needs to be given a command to execute
read: man xargs
it even has got some examples in it.

It was not ready made for copy/paste - it was an (incomplete) example.

after some experience i found that my command is correct but the problem is paths in text file contain spaces and other unsuitable character and i don’t now how to fix it

spaces can be a problem - but what should not be is:
“other unsuitable character”
whatever that might mean.

what happens when you use this:
xargs -a ~/Desktop/scan.txt -0 /usr/bin/ls -hl
vs this:
xargs -a ~/Desktop/scan.txt /usr/bin/ls -hl

Are the files listed one by one with one of these?

If not, here are some examples which, when put together in the right way, should enable you to use your file with strange characters and spaces in the name:

https://www.howtoforge.com/tutorial/linux-xargs-command/

I also found this reminder:

cat (Unix) - Wikipedia

but somehow I always think of using cat anyway, instead of redirection.

Why don’t you just write a bash script that reads every line in your text file?
Then you can:

  1. Start by printing (echo) them one by one to the terminal.
  2. When you are satisfied with the parsing of the text lines check for the file existence to make sure it is accessible because you said they contain spaces and “other unsuitable character” which i translate to UTF-8 chars…
  3. After that also is successfull, you can call your app (bleachbit) with the filename found per line in the text file.

No need to cramp it all inside a single command line, when you can be more in control and verbose for your self using a script. :wink:

There are plenty of examples on the web that show you how to read lines of text from a file using bash :vulcan_salute:

Do not use BleachBit on ANY OS. Use Stacer and only check the 1st, 2nd, and 5th option under it’s cleaner.

why what is wrong with bleachbit

If used incorrectly which the vast majority do use it incorrectly one will hose (kill) their OS.

:woman_facepalming:
Sorry for butting in here but…
That’s like saying don’t use rm on ANY-OS because etc (with same argument…

Please never-ever suggest ppl not to use stuff in such a way…
Because any program used incorrectly will cause problems one way or the other…

And please stop generalizing users in a way you view them personally only, or state statistics to backup your claim of that “vast majority”…
You don’t see me making such statements, just because i know more as (some) others do you?

(Pun intended in my own line above with (some) :wink: )

Squishing a file or a folder that way - may not be as secure as you think when it resides on a flash based device.

nothing - except it may,
despite the name of the option used (shred),
not have the effect that you intended it to have.
See @linux-aarhus post.

Since I’m here:
I’m slightly curious whether you where successful with parsing your file
and feeding it to whatever shredder you prefer.