1

So I want to use bindfs that require the mounted directory to be empty. Then I'm trying to move WhatsApp (Internal storage) contents to external SD card

sdcard="/mnt/media_rw/6DE8-1BC6/"
mv /data/media/0/WhatsApp/* /data/media/0/WhatsApp/.* $sdcard/WhatsApp/

But then mv outputting this

mv: can't remove '/data/media/0/WhatsApp/.Shared': Is a directory
mv: can't remove '/data/media/0/WhatsApp/.StickerThumbs': Is a directory
mv: can't remove '/data/media/0/WhatsApp/.Thumbs': Is a directory
mv: can't remove '/data/media/0/WhatsApp/.trash': Is a directory
mv: can't remove '/data/media/0/WhatsApp/Backups': Is a directory
mv: can't remove '/data/media/0/WhatsApp/Databases': Is a directory
mv: can't remove '/data/media/0/WhatsApp/Media': Is a directory

What is happening here?

Maybe I should use this instead?

cp -r /data/media/0/WhatsApp/* $sdcard/WhatsApp/
cp -r /data/media/0/WhatsApp/.* $sdcard/WhatsApp/
rm -rf /data/media/0/WhatsApp/

I'm running this using init.d

4
  • instead of copy you can create hard links with cp -al (if $sdcard is on same file system). another method is piping two tar commands together unix.stackexchange.com/q/127712
    – alecxs
    Nov 15, 2020 at 9:20
  • I don't think fat filesystem support links. How I pipe tar?
    – Jtnqr
    Nov 16, 2020 at 5:59
  • tar : Unknown option Bf :(
    – Jtnqr
    Nov 16, 2020 at 13:06
  • 1
    'tar -c /sdcard/WhatsApp | tar -xC $sdcard && find /sdcard/WhatsApp -mindepth 1 -delete'
    – alecxs
    Nov 16, 2020 at 13:54

0

You must log in to answer this question.

Browse other questions tagged .