Rox file manager copying large files (how to know when complete)

Moderator: Forum moderators

Post Reply
User avatar
bigpup
Moderator
Posts: 6993
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 911 times
Been thanked: 1528 times

Rox file manager copying large files (how to know when complete)

Post by bigpup »

Copying large files in Rox file manager, may appear complete when it is not.

This is an issue with very large files and slow media (older hard drives, USB drives, etc....)

Rox file manager does copying in a two step process.

1. The copy is first written to RAM.

2. From RAM then written to the target media.

Rox just shows the first step, and will appear to show copy is complete, but it is still doing the copy from RAM to the target media.

For USB drives.
If you remove a USB drive being copied to, before the copy has been completely written.
It can end up with a corrupted drive and a not completed copy.

How do you know copying is complete for a USB drive?

1. If drive has an activity light. Wait for the light to stop blinking.

2. Right click on the desktop drive icon, for the USB drive partition being copied to, and choose UN-mount.
It will refuse to UN-mount, until the copying is complete. (indicated by the mount symbol on the right top corner of the icon)
When it will UN-mount. (mount symbol is gone)
You know it is finished doing the copy.

This also applies to any drive partitions a copy is being written too.
If Rox is still writing to it.
It will not UN-mount until writing is completed.

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

User avatar
wizard
Posts: 1984
Joined: Sun Aug 09, 2020 7:50 pm
Has thanked: 2648 times
Been thanked: 692 times

Re: Rox file manager copying large files (how to know when complete)

Post by wizard »

@bigpup

You might also try this copydone.sh script from this post:
viewtopic.php?p=124397#p124397

wizard

Here's a little script created with YAD and based on the suggestions by @williams2 ..

Start your copy, then run copydone.sh (just click it). You'll get a "In progress" message and then a "Copy complete" message.

copydone.sh.gz
Remove fake .gz from name to make it an executable file.
(457 Bytes) Downloaded 6 times

.
.

Last edited by wizard on Fri Jun 28, 2024 2:01 pm, edited 2 times in total.

Big pile of OLD computers

User avatar
Flash
Moderator
Posts: 978
Joined: Tue Dec 03, 2019 3:13 pm
Location: Arizona, U.S.
Has thanked: 51 times
Been thanked: 127 times

Re: Rox file manager copying large files (how to know when complete)

Post by Flash »

rsync has options -P and -progress that look like they might do what you want.

I think it was Plinej who wrote a front end for rxync that he called copy-fast. I use it because it copies mp3 files from a directory in numerical order. Dragging and dropping in Rox will sometimes copy files out of numerical order, which causes problems in some mp3 players. But copy-fast doesn't give notice when the copy is complete. Perhaps it could be modified to do that.

Chaos coordinator :?
User avatar
bigpup
Moderator
Posts: 6993
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 911 times
Been thanked: 1528 times

Re: Rox file manager copying large files (how to know when complete)

Post by bigpup »

Thanks for the added posts about other things to help.

This is a How -to topic.

So please provide the how- to use what ever you post.

With exact info on how to do it.

Thanks!

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

User avatar
greengeek
Posts: 1384
Joined: Thu Jul 16, 2020 11:06 pm
Has thanked: 535 times
Been thanked: 192 times

Re: Rox file manager copying large files (how to know when complete)

Post by greengeek »

I think the easiest way is - after starting the rox copy - open a terminal and type :

sync

When it comes back with the normal terminal prompt you know rox has finished.
Otherwise - you have to assume the copy is till running!

User avatar
Chelsea80
Posts: 361
Joined: Tue Mar 09, 2021 12:44 am
Has thanked: 47 times
Been thanked: 75 times

Re: Rox file manager copying large files (how to know when complete)

Post by Chelsea80 »

Hello All

Interesting thread, variety of choices.

Flash wrote: Thu Jun 27, 2024 8:51 pm

rsync has options -P and -progress that look like they might do what you want.

Further investigation gives this:

In rsync what does the -P option do?

Sources
askubuntu.com favicon
superuser.com favicon

Answer
The -P option in rsync is a shorthand that combines two other useful options:

--progress: This shows progress during transfer

--partial: This keeps partially transferred files

Specifically:

The --progress option displays detailed information about the transfer as it's happening. It shows you which files are being transferred and provides statistics on the transfer speed, percentage complete, and estimated time remaining

The --partial option allows rsync to keep partially transferred files if the transfer is interrupted. This is useful for resuming large file transfers that may have been stopped due to network issues or other interruptions

By using -P, you get both of these functionalities in a single, convenient option. This is particularly helpful when transferring large files or directories over potentially unreliable connections, as it allows you to monitor the progress and easily resume interrupted transfers. For example, a command using the -P option might look like this:

rsync -avzP source_directory/ user@remote_host:destination_directory/

This command would transfer files from source_directory to destination_directory on a remote host, showing progress during the transfer and allowing for partial transfers to be resumed if interrupted

Hope it helps.

EDIT

If you still interested in using rsync then the attached is a pretty good read. Scroll to the end to find info on USB.

rsync.pdf
(360.54 KiB) Downloaded 13 times

Chelsea80

1. BionicPup32+28 19.03 - Linux 4.9.163 - lxpup - 32-pae [i686] - (UPup Bionic Beaver)
....Frugal Install - Internal HDD - Gateway MX8716b - HDD 120GB - RAM 2GB

2. Friendly-Bionic32 v1.1
....USB Stick 2GB

HerrBert
Posts: 357
Joined: Mon Jul 13, 2020 6:14 pm
Location: Germany, NRW
Has thanked: 18 times
Been thanked: 126 times

Re: Rox file manager copying large files (how to know when complete)

Post by HerrBert »

bigpup wrote: Thu Jun 27, 2024 1:24 am

Copying large files in Rox file manager, may appear complete when it is not.

This is an issue with very large files and slow media (older hard drives, USB drives, etc....)

Rox file manager does copying in a two step process.

1. The copy is first written to RAM.

2. From RAM then written to the target media.

Rox just shows the first step, and will appear to show copy is complete, but it is still doing the copy from RAM to the target media.

For USB drives.
If you remove a USB drive being copied to, before the copy has been completely written.
It can end up with a corrupted drive and a not completed copy.

How do you know copying is complete for a USB drive?

1. If drive has an activity light. Wait for the light to stop blinking.

2. Right click on the desktop drive icon, for the USB drive partition being copied to, and choose UN-mount.
It will refuse to UN-mount, until the copying is complete. (indicated by the mount symbol on the right top corner of the icon)
When it will UN-mount. (mount symbol is gone)
You know it is finished doing the copy.

How about a notification when unmount completed?
What i did in all my slacko installs is to edit /usr/local/pup_event/frontend_rox_funcs to show a yaf-splash notification if rox has unmounted a usb drive.

I know that modern Puppies differ. So here is a piece of code i'm using in slacko:

Replaced line 576: [ "$DRV_CATEGORY" = "optical" ] && eject /dev/$ONEDRVNAME
with:

Code: Select all

			case $DRV_CATEGORY in
				optical) eject /dev/$ONEDRVNAME;;
				usbdrv) # HerrBert, kein NLS
					yaf-splash -close never -timeout 5 -placement bottom -text "$ONEDRVNAME kann jetzt entfernt werden" & ;;
			esac

Where yaf-splash is the traditional symlink to /usr/bin/gtkdialog-splash
With my modified /usr/lib/gtkdialog/box_splash it looks like this:

unmount-notification.gif
unmount-notification.gif (162.91 KiB) Viewed 758 times
User avatar
bigpup
Moderator
Posts: 6993
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 911 times
Been thanked: 1528 times

Re: Rox file manager copying large files (how to know when complete)

Post by bigpup »

Thanks for all the useful tips and edits!

However, the topic is about how to do it as Puppy is not modified, added to, or changed.

But I am sure we can all make use of the stuff in the other posts :thumbup: :D

Keep them coming, if you know of something else to do, to help with this issue :thumbup:

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

User avatar
Flash
Moderator
Posts: 978
Joined: Tue Dec 03, 2019 3:13 pm
Location: Arizona, U.S.
Has thanked: 51 times
Been thanked: 127 times

Re: Rox file manager copying large files (how to know when complete)

Post by Flash »

The copy command, cp, has an option, -v (for verbose).

Chaos coordinator :?
superhik
Posts: 42
Joined: Mon Jun 19, 2023 7:56 pm
Has thanked: 5 times
Been thanked: 19 times

Re: Rox file manager copying large files (how to know when complete)

Post by superhik »

The problem arises due to buffering, where completion in RAM may signify finished writing, but data is still being written to the drive. This issue occurs consistently across various file managers. To monitor USB drive insertions and ongoing data writes, I've devised a script that reads from /sys/block. Ideally, this script should be displayed on the panel or integrated into Conky. When the script detects USB drive activity, it should indicate ongoing operations, and when idle, it should confirm no ongoing writes.

Code: Select all

#!/bin/bash
# while sleep 2; do
	if ls -l /dev/disk/by-path/*usb* &>/dev/null; then

		USB_DET=($(ls -l /dev/disk/by-path/*usb* | grep -v "part" | awk '{print $NF}' | awk -F "/" '{print $NF}' | sort))

		for usb in "${USB_DET[@]}"
		do
          	 	if [ $(awk "{ print \$9 }" /sys/block/$usb/stat) -gt 0 ]
			then
				sector_size=$(cat /sys/block/$usb/queue/hw_sector_size)

				DATA_WRITTEN=$(awk '{load = $7*sector/1000/1000
							printf "%.1f", load}'  sector="$sector_size" /sys/block/$usb/stat)
        			printf "%s: %s%s " "$usb" "$DATA_WRITTEN" "MiB"
			else
				printf "%s: %s " "$usb" "idle"
			fi
		done
	else
		echo "USB None"
	fi
# done

Stealing from the poor to give to the rich!
bslit - Block Splitter Custom Calendar Widget + Diary

Post Reply

Return to “File Management”