Reply to topic

Dolphin quick format menu (KDE PartitionManager integration)

5

Votes
6
1
hidden
Registered Member
Posts
8
Karma
0
OS
The idea is quite simple. Since we have an awesome KDE Partition Manager, it would be nice to have a quick option to format any external drive (USB, etc.) via Dolphin using this menu (without having to enter root's password):

Image
User avatar google01103
Manager
Posts
4960
Karma
17
OS
there is a quick usb formatter tools available on apps-kde.org that is callable from device notifier when a usb drive is inserted


OpenSuse 13.1 x64, KDE 4.12.x

Problem solved? Please click on Image below the post with the best answer to mark your topic as solved.
hidden
Registered Member
Posts
8
Karma
0
OS
Thanks for your reply. That's not a problem for me to install anything or to do the same things in terminal. I just want KDE to have such feature out of the box, so that new users who came from Windows wouldn't have to spend much time googling or rebooting to the well-known OS.
User avatar Fri13
Registered Member
Posts
363
Karma
4
OS
Formatting does not belong to filemanager tasks. If you want to get storage medium empty, you should not use formatting but simply select all files and delete them.

Formatting is a function what is used to fix the filesystem corruption if so badly damaged that normal fixing is not possible or to change filesystem or create a filesystem (no previous filesystems exist).

Formatting is a function what belongs to partition tools like fdisk, cfdisk, gpartition or kde partition manager and a like.
Most users do re-partitioning too often and totally wrong reasons.

And any filesystem management should require root permissions, so root needs to assign user to group what is allowed to use filesystem tools on specific devices.
User avatar Mte90
Registered Member
Posts
98
Karma
0
OS
this thing would be very useful, is a lack of kde, you could put in a secondary package...

@google01103
The tool on kde-apps.org what's his name?


http://www.mte90.net/
Kde, Debian e Programmazione web/Desktop!

Linux Counter.li #482442
User avatar google01103
Manager
Posts
4960
Karma
17
OS


OpenSuse 13.1 x64, KDE 4.12.x

Problem solved? Please click on Image below the post with the best answer to mark your topic as solved.
User avatar Fri13
Registered Member
Posts
363
Karma
4
OS
Mte90 wrote:this thing would be very useful, is a lack of kde, you could put in a secondary package...


You don't want to re-format USB stick. Just select all files and press Shift+Del to delete them. :)

It is the logical and safe way to do it.
luebking
Registered Member
Posts
923
Karma
7
Fri13 wrote:You don't want to re-format USB stick. Just select all files and press Shift+Del to delete them. :)
It is the logical and safe way to do it.


I assume what he wants to do is
Code: Select all
sudo dd if=/dev/zero of=/dev/sd<x>[<n>]
what neither deleting nor "formatting" would do.

(Warning: if somebody doesn't know what that does, don't try - google it up ;-)
User avatar fakd
Registered Member
Posts
176
Karma
0
OS
Fri13 wrote:You don't want to re-format USB stick. Just select all files and press Shift+Del to delete them. :)
It is the logical and safe way to do it.
It may be logical, but sure it isn't "safe". Using your method only the files you see are deleted, but there may be hidden files, which wouldn't get deleted. (Of course you could fiddle with the dolphin settings every time...) Also in any way I doubt it would be so fast/convenient as the OP wishes.

I know this quick forma[1] from windows (explorer), where I have used it some times. Especially with big & full drives it "felt" (I didn't measured so I don't really know) somewhat quicker, since it was one action per drive, instead to the other where you could see each file deleted one by one.

However, as I can see the libparted library (which is used by KDE Partition Manager) doesn't offer such functionality.
So IMHO a menu entry for removable devices with a simple command which deletes all files (including the hidden ones) on the disk, would be:
  • fast i.e. convenient
  • doesn't require root access
  • safe (of course there should be security query)
  • and within the specs of a file manager

+1


quick format:
Differences between a Quick format and a regular format
Format (command)
luebking
Registered Member
Posts
923
Karma
7
The hidden files being hard to access argument is silly - pressing "alt+." in dolphin is not hard and faster than clicking through a context menu.

> fast i.e. convenient
No. Deleting many inodes takes time. Rewriting the filesystem has static time costs (ok: depending on the filesystem ;-) but will usually require root access.

> doesn't require root access
No. Even regular deleting will require root access to delete *all* files unless all files belong to you. Rewriting the filesystem will usually for sure (see above) - otherwise your system has been artificially weakened.

> safe (of course there should be security query
No! Neither deleting nor "quick format" nor repartinioning is "safe"!

"Deleted" files are just removed from the filesystem table, not from the storage device. Not even a "quick format" (what means to rewrite the filesystem header) is "safe" in this regard, nor is repartitioning.
The actual content remains completely untouched and can be restored any time.

If you want to destroy information, you've to override it and you better know what you're doing then (and no: the bleachbit authors don't - see various bugreports for all kinds of processes crashing after using ****), because the overridden file must not be in use otherwise (if it's mapped into some processes virtual memory, you can expect that process to crash very soon)

If you want to blank a whole partition this way, you'll require root access.

----

I am really unsure what's the target task of this brainstorm, but suggest that it should be clearly specified first (ie. start by "what i want to do", not "how i want to do")

- If it's just about deleting all files in a directory: delete the directory.
If you cannot delete the directory (being the root path), add yourself an inode action that does "rm -r *; rm -r .*" on that path.

- If you want to destroy information, add an entry that dd's a path.
Notice: Performing this in a safe manner will require to test the files usage in any process - doing this "right" for random files will inevitably require root access for that reason (of course a .doc on a usb stick just mounted is usually not mapped anywhere and can safely be overridden ;-)

- If you *really* want to format a storage device, ie. including rewriting the filesystem, install one of the mentioned tools - i assume they'll add the relevant actions anyway.
hidden
Registered Member
Posts
8
Karma
0
OS
Well, I have seen many typical users experiencing a 'no space left' problem with no any idea how to fix it. And the reason usually is located in any kind of trash (mostly), thumbnails, cache hidden folders. Speaking of typical users, there's no way of teaching them to open a new terminal window and type su/sudo/rm/dd/emerge -avuDN world/whatever else - they just want to get their storage working again. And yes, there might be files owned by another user.

So, the primary idea is to have a way to get e.g. 16 GB available of 16 GB total.
Secondly, I'd like to have a quick option to format any external drive as described in the first post. I don't often use USB drives, but I'd find such menu useful.
luebking
Registered Member
Posts
923
Karma
7
You don't require a terminal to show or delete hidden files - every filemanager has quick options to show them.
There's also filelight to get you an idea about what is using the space.

"Delete everything" to free some space doesn't sound like a very reasonable approach to me, but doesn't require more than deleting all toplevel inodes ("folders and files") ie. you either "delete a folder" (and all content within it) or you delete everything on a device.

Deleting stuff that doesn't belong to you inevitably requires privilege escalation.


The other question is still why you believe you need to "format any external drive" in the first place.
As explained before, formatting is hardly ever required nowadays (different from when you purchased unformatted floppies which you needed to "fully" format and therefore perform an implicit blocktest, thus implicit rewrite of all sectors, thus implicit magnetically align sectors every now and then anyway)

Today you'll rather get a usb stick and that will be pre-formatted - even external HDDs are usually.
The only reason will be to actually alter the partition table or change the filesystem from vfat to Linux or HPFS/NTFS - what means you want to repartition the device, not "format" it (and mkfs afterwards)
"format" btw doesn't exist in the *nix world anyway; except for mformat from the dos tools ;-)
You will inevitably require root permissions for either - or you have to weaken down the system. Deleting all files on a user mounted vfat device (all files belong to you, there're no attributes on vfat) however won't.
User avatar fakd
Registered Member
Posts
176
Karma
0
OS
[Hidden files]:
The problem with the hidden files is not only that you have to fiddle with the view options, but you also have to know that you have to change the view options to delete all files. And I consider the latter as the main usability problem here.

[Files from another User]:
Files form another user, doesn't mean at all you don't have write access to them. I guess most USB drives are for cross-platform compatibility formatted in FAT32 (at least mine are). So even if the files on you USB drive would be from God himself, you could still delete them as an average user. ;-)
And even if there is a FS with right management on you USB drive, it still doesn't mean, you can't delete files from someone else.
So I would consider the case where you need root rights to delete normal files from you USB drive a very very rare case...

[Formatting]:
As I tried to explain in my post, besides from FORMAT (in MS DOS), there is no such thing in as quick format(TM). So you would always end up doing a full format, which a) wouldn't be quick at all and b) would require root access. So this is IMHO not the way to go.

[Date security]:
As I understand it, this issues is not at all about data security (i.e. you want to delete the files so no one can read them ever again, even with special tools).

Conclusion:
I still would go with a simple rm command as context menu entry:
  • faster (one right click, one left click), than deleting by hand
  • safer, than deleting by hand (since you don't have to alter the view settings and you don't need to know to alter the view settings)
  • deletes all files in 99.99% of the use cases
  • faster as formatting and doesn't require root acess
User avatar Fri13
Registered Member
Posts
363
Karma
4
OS
hidden wrote:Well, I have seen many typical users experiencing a 'no space left' problem with no any idea how to fix it. And the reason usually is located in any kind of trash (mostly), thumbnails, cache hidden folders. Speaking of typical users, there's no way of teaching them to open a new terminal window and type su/sudo/rm/dd/emerge -avuDN world/whatever else - they just want to get their storage working again. And yes, there might be files owned by another user.

So, the primary idea is to have a way to get e.g. 16 GB available of 16 GB total.
Secondly, I'd like to have a quick option to format any external drive as described in the first post. I don't often use USB drives, but I'd find such menu useful.


Storage device filesystem reseting is task of the superuser aka root. Not a typical user.

First of all, you don't need command line to do it at all. All what you need to do is to have a very basic knowledge of the files. That means, you know what difference is between "Folder" (actually directory, a special file), file and hidden file.

1) User needs to know how can files be hidden or shown.
2) User needs to know files have owner and group.
3) Users should know that file what they delete doesn't get deleted unless someone writes over it (even a single pass is enough for that).

Why those?

For security reasons and "cleaning" user can hide some files what not wanted to see or can find them if hidden. Can operate system config files later if needed as well.
For security reasons that a storage device can include files from multiple users and every user has own permissions. You don't want to allow one person to block others users access to their files what they stored to that removable device because they wanted "easy and quick". Or that different systems (Like OS X and Linux distributions) store different ways hidden data and you have forgotten it.
And security reasons that you need to re-write the data over once with /dev/urandom (not with /dev/zero) if wanted to get it more secure (forensic people specialed to data retrieval have informed that even one overwrite with random data renders file unaccessible, but with NAND devices you need to write whole device as data is distributed every write time differently).

1) The partitioning is a task what belongs to device manager, not to file manager.
2) Formatting isn't task belonging to file manager.
3) Deleting files belongs to file manager, but not for device manager.

Formatting is a technical function what is only used to generate a new filesystem to specific partition. It is not meant to empty the drive.
People who use formatting to clear FLASH drives have already learn wrong habits and they don't have knowledge of the correct ways to manage devices.

There are as well lots of problems happen, example with memory cards being formatted on computer and then wondered why they get card error in camera middle of the holiday. That is because they have worked wrong with the technology. Not knowing they should have only deleted the files in card on computer or on camera and use formatting only when you need to make the storage medium filesystem changed to compatible, example from NTFS to FAT32.

User must learn basic file management if wants to use any computer whats directory hierarchic is visible to user.

Using formatting to clear flash cards/sticks is as bad as is habit to use Shift+Delete to delete files always instead only in special cases and otherwise just Delete button what moves files to trash from where user can return files if needed. Or clearing trash always after deleting files.

To know that there can be a hidden files and you need to change view for that, is not a usability problem. It is a usability feature that it exist that some files needs to be protected from the user deletion by accident. Quick format is like a giving a gun to child and just waiting something bad to happen.
Good usability is not always fast speed and single button -tasks. It is as well protecting user from doing mistakes easily. Example Save and Open should never be joined together as often people do edits and then notice that original was much better. So they go File > Open and by few pixel mistake they click "Save". Whoopsiii.... That is terrible thing in many applications/games where there is no undo functionality at all and you don't have backups.
Second example, good usability is in car wheel that it is hard to rotate, you actually need to apply force to direct car to another direction, but because it is a wheel it is natural, very effective and easy thing to turn car direction in dangerous situations. This compared to wishes there would be a joystick replacing the wheel. Joystick would be simpler, easier to turn but car would turn more accidentally and in dangerous situations the joystick would not be used so well but radically over-steering car causing more serious dangerous situations.

What comes to other users files, even that today most common filesystem is FAT32 for USB sticks, it is changing. People already use Ext3/4 (thanks Android), NTFS etc.
People share the sticks between family members and file permissions are there to protect users from accidentally (or by purpose) to delete other users files.

And formatting sticks again and again not just build a bad habits (very dangerous, user is the enemy for himself) but as well wear out quickly the device NAND as the writing happens there same position. When deleting files, computer go trough every file and marks them deleted but doesn't wear the NAND memory at all from same location and device lifetime is much longer. And user even gets the information when deleting files instead formatting when there is a read/write error, meaning when they need to replace the medium safely at home instead when they are on road with important data already on stick or going there.

Normal user should never be given a "weapon" what he can use to do more damage (learning bad habits is most dangerous one) than good.
And those who already know hidden files, has no problem as it is just single click to show all files, single click and drag (or Ctrl+A what is universal command what user should learn from day one) to select all files and single click to press "Delete" or with Shift to delete without going trash.

Backupping files is one of the most important habit what computer user can have. And even how far stretching it might sound, formatting devices is exactly against that.
There is a reason why Unix systems were designed with root and normal users. And why the formatting functions where disallowed from normal users and given only for root. Normal users don't need formatting, it is a feature what should only be on root.

Requesting a formatting to application where it doesn't belong isn't logical. Requesting a feature what for normal user what should only be on root isn't logical. Requesting a dangerous feature in name of usability because it gives it behind 1-2 clicks is most illogical of all and not good usability at all.

And finally, adding a hardware/root related feature to KDE what requires a dependency to new library and root rights is not smart at all.

 
Reply to topic

Bookmarks



Who is online

Registered users: AElfwine, anditosan, Baidu [Spider], bcooksley, Bing [Bot], doublerainbow64, Exabot [Bot], Google [Bot], google01103, hefeweiz3n, inksi, jensreuterberg, kainz.a, koriun, l3u, moisachedaniela, Paulms, pbCyanide, raphaelpoli, scummos, SecretCode, Sentynel, toad, tparrott, Yahoo [Bot]