linux – Bash script to copy files and then move them to trash (non-destructive)

I am trying to write a script to copy files with cp or, preferably, rsync and then move the source files to the trash. I do not want to use mv because in case of an error, I want to be able to recover the source files.

This script works. It hard codes the destination folder.

for i in "$@"; do
    cp -a -R "$i" '/home/userxyz/Downloads/folder1'
    gio trash "$i"
done

However, this script that uses a variable for the destination folder does not work.

read -p "Enter destination folder: " destination

for i in "$@"; do
    cp -a -R "$i" "$destination"
    gio trash "$i"
done

Error when I enter ‘/home/userxyz/Downloads/folder1’ as destination:

cp: cannot create regular file "'/home/userxyz/Downloads/folder1'": No such file or directory

Similarly, this works:

for i in "$@"; do
    rsync "$i" '/home/userxyz/Downloads/folder1'
    gio trash "$i"
done

But this does not work:

read -p "Enter destination folder: " destination

for i in "$@"; do
    rsync "$i" "$destination"
    gio trash "$i"
done

Error:

rsync: change_dir#3 "/home/userxyz//'/home/userxyz/Downloads" failed: No such file or directory (2)
rsync error: errors selecting input/output files, dirs (code 3) at main.c(720) (Receiver=3.1.3)

I have confirmed that ‘/home/userxyz/Downloads/folder1’ exists. What am I doing wrong?

data recovery – Samsung “My Files” app: where is trash?

Situation

There is a Samsung A10 with Android 9. Some files are deleted by My Files app. I tried to find its trash tool by this post:

Open my files. Tap the 3 vertical dots in the upper right corner. On the menu that opens select settings. On the settings menu scroll down to make sure trash is turned on.

For me, there is no option to enable trash.

If you’re not seeing anything that says trash then you might try looking for a my files version update in the galaxy store.

I updated My Files app, but still there is no option to turn trash on.

Question

Am I missing something? How can I see trash in Samsung My Files app?

Other questions

  1. I tried some apps like these to recover deleted files. Some of them did find some old deleted photos, but not the ones which are deleted today:
    1. diskdigger
    2. dumpster
    3. digdeep
  2. I also tried Gallery app: its trash is enabled but its restore didn’t work. I think because the files are deleted by My Files app, not Gallery app. Not sure.
  3. What else I can try to restore deleted photos and videos in My Files app?

Yet another question

I tried undelete app. It mentions that there is no root mode:

Without root, the application can only recover cached images.

How can I root the device without messing it up? Just to be able to use undelete app.

seo – How do you remove the trash left by previous domain name owner?

Your website is https://thewildfire.in/ (it would have been simpler to say so immediately at the start of your question insteady to rely on screenshots that are difficult to read, impossible to search on or to quote, even so much here that the important parts are just text lines that you could have pasted as is).

The software you show in screenshot seems to try some random not existing URLs such as https://thewildfire.in/404javascript. If you go there, and look at source code, you see:

    <script language="Javascript" src="https://cdn.jsinit.directfwd.com/sk-jspark_init.php"></script>

This seems to be a default “404” handler that will generate a page for any random URL not existing, hence explaining your “which are not present on the root directory of my server,”.

Try https://thewildfire.in/foobar and you will get the same page and same error.

Some security tool are testing random pages like that to search for vulnerabilities.

But this page served is reported as having “HTTP served in HTTPS”
because you are serving a page over HTTPS that includes elements (here a Javascript) served over HTTP. This should be fixed because nowadays browsers will at least flag that, if not even refuse to load this HTTP content, as otherwise it creates a security risk (the security of a whole system is the security of its weakest link: if you run “inside” and HTTPS page a Javascript downloaded over HTTP, this cancels the security you gained with HTTPS as that script over HTTP could have been completely hijacked in transit)

Your solutions in no specific order nor are they exclusive of each other:

  • look if the above content served over HTTP can be served over HTTPS and if so, fix that URL
  • look at your configuration and why you are serving those kind of pages in case of 404. Do you really need them? Specifically because right now besides showing a spinner they fail to do anything useful. Remove this specific “404” handler or have one not depending on HTTP resources.

All of this has nothing to do with previous content. Your current content is what is above and generates the errors of “HTTP in HTTPS”.

SUPPORT – Avoid Being Banned For Trash Comments | NewProxyLists

Hi all, today i am introducing another legit url shortener Shrink.Pe with daily payments (payments are made within 24 hours) also we offer cpm of up to $10 per 1000 visits with lowest cpm of $2.5. we pay via PayPal, Payeer, we money, upi, Paytm, goglepay, paysera and bank transfer to all our…


www.beermoneyforum.com

mail.app – Apple Mail IMAP incorrectly moving to Gmail’s Trash, not Archive (All Mail) as intended

Setup: macOS Big Sur, using Apple Mail client connected to Gmail via IMAP.

Expected behavior: when deleting an email from Apple Mail client, Gmail should preserve it in All Mail (i.e Archive).

Behavior I’m getting: Gmail moves emails to Trash.

Gmail IMAP settings:
enter image description here

Apple Mail settings – Mailbox Behaviors:

enter image description here

There is a Password Protection for email in trash folder?

Pasword Protected for email in trash folder?? Is there is an option? Thank you for your assistance.

When I trash an email item it either goes to my Important file or disappears entirely. What is happening?

When I trash an email item it either goes to my Important file or disappears entirely. How can I fix this?

How to modify this existing post of script and/or steps so it functions to automatically empty Gmail Trash?

I found this post on how to do the above but where you get to the

"Click on Google Platform Link"

it doesn’t appear to work?

https://webapps.stackexchange.com/a/120866

thanks

Google Slides – File owner’s is in trash

I received a link to a file on Google Drive. When I try to open it, it says "File is in owner’s trash" and there is no Download button.

How can I download it?

EZCRYPTO V2.0 – EARN CRYPTO ON AUTOPILOT (WITHOUT DOING USELESS TRASH) | NewProxyLists

Hey Guys!
Today im gonna share my new eBook with you! (Don’t worry, no scammy bs. Real & working how-to with 14 pages.)

I am not here to waste your time. I am not here to spread reflinks from scam sites. I’m here to show you a working Method to get Cryptocurrencies on Autopilot. You dont need to sell something. You dont need any affiliatelinks anything like this. I’ts easy and you can set it up in less than an hour.

Download:

Hidden Content:

You must reply before you can see the hidden data contained here.

dont leach.:mad:

have fun,
TonySweatshirt :)