Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
hi, I am currently using debian 6.0 .
While moving the file , electricity vanished. It happened that the file being moved wasn't at source neither destination folder.
Is there a file copy program which works atomically (like teracopy in windows) .
Yeah , common sense would be to manually copy then delete file from source . Can't this be integrated into GUI by a program?
That's a lesson to remember! You can move documents and other small files as much as you like, but for larger files it is safer to copy, as you did experience.
When working in a shell use the cp command.
Nautilus automatically copies files when you drag & drop from one partition to another. If you wish to copy a file within the same partition you can use copy & paste.
isn't there any software that safely moves file i.e remove source only after transfer is 100% i.e what I meant by atomic operation?
teracopy is one of those in windows .
Also such a file copy manager should replace default if needed.
Actually people mostly use GUI not terminal , otherwise cp & rm is fine.
For instance :- in windows tera copy integrates into explorer so ctrl+x & ctrl+v (as usual) does cut & paste via teracopy so that in case of power failure the file remains safe at either source or destination unlike explorer.
I believe :- in linux , there must be a GUI alternative of teracopy.
Linux is not Windows.
As said before moving large files is a risky thing to do.
So, better learn to overcome this terrible limitation in Linux and copy as much as you desire.
Or develop a plugin for the file manager that does "teracopy".
There are "people" that prefer CLI to GUI. So your statement is false.
You never specifically requested that it has to be GUI. Also, use of the command line in Linux typically isn't considered a bad thing or something to be avoided.
Quote:
For instance :- in windows tera copy integrates into explorer so ctrl+x & ctrl+v (as usual) does cut & paste via teracopy so that in case of power failure the file remains safe at either source or destination unlike explorer.
I believe :- in linux , there must be a GUI alternative of teracopy.
Does it have to integrate into an existing file manager?
I guess it has to, becasue if there was a GUI application that has two entries for source and destination files and a "Copy" button, it would be much less practical and not any easier to use than the command line.
What I think happens when moving files is this:
The actual data on disk is not moved from one physical place to another, merely the index pointing to it is re-written. So in your case it looks like the power failed between deleting the old index and writing the new one. Your file is probably sitting there intact but inaccessible, but for how much longer I can't say, it's probably at risk of being over-written as more file operations take place.
But I'm not an expert on this, don't quote me.
Actually file was transferred from USB to hard disk so it was data transfer unlike inode change had both files been on same partition. i know recovery software named testdisk .
Question remains as it was : is there any alternative file copy manager in linux ?
Move first copies the file and then deletes it when moving files between filesystems.
If the file is being moved to the same filesystem it changes directory entries, and the file on the disk itself doesn't move.
From the mv info manual:
Quote:
It first uses some of the same code that's used by `cp -a'
to copy the requested directories and files, then (assuming the copy
succeeded) it removes the originals. If the copy fails, then the part
that was copied to the destination partition is removed.
What probably happened is that the file was successfully moved, but the filesystem journal wasn't updated, reflecting all the changes.
jschiwal , did you mean that file was moved to ntfs partition though it was not updated in file allocation table of hard disk yet file was removed from USB stick.
Quote:
What you could do, with an extension, is adding
Ultracopier custom menu items to the context menu, but you can't assign
keyboard shortcuts to them (see [1]).
That means we can have ultracopier in context menu but not assign keyboard shortcut.
So the question is How do we add item to file context menu & associated command ?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.