65
submitted 8 months ago by imgel@lemmy.ml to c/linux@lemmy.ml
you are viewing a single comment's thread
view the rest of the comments
[-] russjr08@outpost.zeuslink.net 42 points 8 months ago

I posted about this on the KDE community a couple of weeks ago, but Dolphin (their file manager) has a nice trick for archives (zips, tar's, etc) - in the extract menu, there's an "Extract, Autodetect Subfolder" button which will:

  • If the archive has an inner subfolder (and just that), it will extract this as expected
  • If the archive doesn't have an inner subfolder, and all the files are at the root level, it will create a new folder for you and extract the files there

This way, you don't end up with files splattered all over say, your downloads folder. Easily one of my favorite features, and is something I wish every File Manager had. It feels like someone had the same pain that I do (and I'm sure plenty others) of extracting something, and regretting it - but then they went as far as to fix the problem for everyone and implemented a feature for it (I'd love to have the knowledge to contribute to KDE someday)!

[-] Cwilliams@beehaw.org 3 points 8 months ago

A script to do that would also be nice for us cli junkies

[-] hackris@lemmy.ml 2 points 8 months ago

As a fellow cli junkie, I made my own script like this years ago. But I got rid of it as part of debloating my system. Whenever I want to extract something, I create a directory and move the archive there.

[-] russjr08@outpost.zeuslink.net 2 points 8 months ago* (last edited 8 months ago)

Actually, someone in that thread pointed me to https://www.nongnu.org/atool this, which does exactly that!

[-] Astaroth@lemm.ee 1 points 7 months ago

7z x yourfile -odirectory

this post was submitted on 06 Nov 2023
65 points (98.5% liked)

Linux

45496 readers
1682 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS