LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-08-2012, 12:31 AM   #1
Xplorer4x4
Member
 
Registered: Mar 2012
Location: Evansville,IN
Distribution: Manjaro KDE
Posts: 58

Rep: Reputation: Disabled
Right Click on Folders and/or Search for Archives


I recently made the switch from Windows to Kubuntu. In windows I used Extract Now for pretty much all my extraction needs because of one great feature, the ability to right click on a folder and choose "Search for archives" from the context menu. This was awesome because it would seek out all rar files with in that folder and any of it's sub folder and extract them all. It could even clean up the mess by deleting all the rar files for you if you opted in for that option.

Being a Kubuntu user now, I have installed Extract Now via wine and it works aside from context menu integration which is not a huge deal breaker, but I would prefer a linux native application with this same capability. Now when it comes to a linux native app I would prefer context menu integration, but don't require it. I would like a basic GUI, but am even less preferential on that. At the very least, a command line option capable of doing just this would be just fine.
 
Old 06-09-2012, 02:29 PM   #2
kareempharmacist
Member
 
Registered: Jan 2012
Location: Cairo, Egypt
Distribution: MX Linux, Ubuntu 18.04
Posts: 336

Rep: Reputation: 42
many customizable distributions contain this option
try pengugos livecd http://pinguyos.com/
or netrunner http://www.netrunner-os.com/
or arios http://arioslinux.org/about/
try the livecds first if u like it install..
 
Old 06-09-2012, 04:33 PM   #3
Xplorer4x4
Member
 
Registered: Mar 2012
Location: Evansville,IN
Distribution: Manjaro KDE
Posts: 58

Original Poster
Rep: Reputation: Disabled
Thanks for the reply, but I am simply interested in a package to do this in kubuntu. I am not looking to switch dsitros.
 
Old 06-09-2012, 04:48 PM   #4
headrift
Member
 
Registered: Sep 2005
Distribution: Gentoo, Sabayon, Puppy, Arch
Posts: 165

Rep: Reputation: 29
Ark might do what you want, but if not:

Code:
find | grep *.rar | xargs unrar e
...and...

Code:
find | grep *.rar | xargs rm
...to remove the files.

You can probably do that without the xargs call using find's -exec action.
 
1 members found this post helpful.
Old 06-09-2012, 04:54 PM   #5
Xplorer4x4
Member
 
Registered: Mar 2012
Location: Evansville,IN
Distribution: Manjaro KDE
Posts: 58

Original Poster
Rep: Reputation: Disabled
headrift, as far as I can see Arc can not do it, unless I missed something. I am still quite new to linux though and not quite grasping the concept behind your method.
 
Old 06-09-2012, 05:02 PM   #6
headrift
Member
 
Registered: Sep 2005
Distribution: Gentoo, Sabayon, Puppy, Arch
Posts: 165

Rep: Reputation: 29
Okay, sorry. "find", "grep", "xargs", "unrar" and "rm" are all shell commands. "find" will give you a list of everything under the directory you run it in, "grep" will search each of those for the pattern given, "xargs" takes each of those and runs a command on it, in this case "unrar" to extract or "rm" to remove. The pipe character just ties them together. You can do all of that on one line if you put a && between what's in those two code blocks.

Open up a Konsole session and try each one out with the "--help" switch to see what they can do first, like:

Code:
find --help
 
Old 06-09-2012, 05:09 PM   #7
headrift
Member
 
Registered: Sep 2005
Distribution: Gentoo, Sabayon, Puppy, Arch
Posts: 165

Rep: Reputation: 29
Quote:
Originally Posted by headrift View Post
You can probably do that without the xargs call using find's -exec action.

Code:
find -type f -name *.rar -exec unrar e {} \;
...spaces are important.
 
Old 06-09-2012, 05:27 PM   #8
Xplorer4x4
Member
 
Registered: Mar 2012
Location: Evansville,IN
Distribution: Manjaro KDE
Posts: 58

Original Poster
Rep: Reputation: Disabled
Lol I said I am quite new, not a complete idiot I understood the basic context of the cli commands with the exception of xarg. It was more what do with the command that was unclear. Thanks though, I can test it her in a bit as I have suspect it would need to be expanded to include r01 or something since different people package rars in different ways and a .rar is not always present. I suspect I can alter it enough to make do all at one though. Thanks for the tip! A gui for this would still be nice but cli will do fine for now.
 
Old 06-09-2012, 07:19 PM   #9
kareempharmacist
Member
 
Registered: Jan 2012
Location: Cairo, Egypt
Distribution: MX Linux, Ubuntu 18.04
Posts: 336

Rep: Reputation: 42
check this out
http://techthrob.com/2009/03/02/howt...u-in-nautilus/
 
1 members found this post helpful.
Old 06-10-2012, 06:51 AM   #10
Xplorer4x4
Member
 
Registered: Mar 2012
Location: Evansville,IN
Distribution: Manjaro KDE
Posts: 58

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by kareempharmacist View Post
I checked it out and seems like it could do the job as it is compatible with KDE and if the above command was implemented but sadly it is not a simply copy and paste job as the app wants to use it's own set of parameters. If any one could manage to get this working I would be forever grateful. I just don't want to have to look up this command every time I want to extract a bunch of rars. A context entry would be the perfect compromise between a full fledged GUI and having to enter this in to the terminal every time.
 
Old 06-10-2012, 03:57 PM   #11
kareempharmacist
Member
 
Registered: Jan 2012
Location: Cairo, Egypt
Distribution: MX Linux, Ubuntu 18.04
Posts: 336

Rep: Reputation: 42
check this out too
http://www.backtrack-linux.org/forum...ad.php?t=37670
 
Old 06-10-2012, 03:58 PM   #12
kareempharmacist
Member
 
Registered: Jan 2012
Location: Cairo, Egypt
Distribution: MX Linux, Ubuntu 18.04
Posts: 336

Rep: Reputation: 42
and this
http://linux-blog.org/KDE-Right-Clic...Here/#extended
 
Old 06-30-2012, 09:08 PM   #13
Xplorer4x4
Member
 
Registered: Mar 2012
Location: Evansville,IN
Distribution: Manjaro KDE
Posts: 58

Original Poster
Rep: Reputation: Disabled
kareempharmacist both of those functions are built in to KDE4, what I asked for was the ability to right click on a folder and click something that would search the directory and any child directories for RAR files and then automatically extract them all with a single click.

What I ended up doing was taking the bash command some one gave me on Kubuntu Forums(I think) and I altered to the Ark Service Menu which I will post below. I am actually going to explore the option to use ark directly and see how it functions. The service menu method I use has 1 flaw. If you make a folder, for example, NEWFILES and inside that folder you have FOLDER1, FOLDER2, and FOLDER3, you can either choose to right click on NEWFILES or select all 3 child folders and then choose to right click and "Search for archives" but if your choose the later method it will launch 3 separate instances of Konsole. If you use the prior method, it only launches a single instances of Konsole and therefore does extraction one by one.

Code:
[Desktop Entry]
Type=Service
ServiceTypes=KonqPopupMenu/Plugin
MimeType=all/all;
Actions=arkAutoExtractHere;arkExtractTo;arkExtractHere;arkSearchForArchives;
X-KDE-Priority=TopLevel
X-KDE-StartupNotify=false
#StartupNotify=false
X-KDE-Submenu=Extract

[Desktop Action arkExtractHere]
Name=Extract Archive Here
Icon=utilities-file-archiver
Exec=ark --batch --autodestination %F

[Desktop Action arkExtractTo]
Name=Extract Archive To...
Icon=utilities-file-archiver
Exec=ark --batch --autodestination --dialog %F

[Desktop Action arkAutoExtractHere]
Name=Extract Archive Here, Autodetect Subfolder
Icon=utilities-file-archiver
Exec=ark --batch --autodestination --autosubfolder %F


[Desktop Action arkSearchForArchives]
Icon=utilities-file-archiver
Name=Search for archives...
Exec=konsole --hold --workdir %f -e find -type f -name '*.rar' -exec unrar e '{}' ';'
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Ubuntu (w/ GNOME) Switching To Single Click For Opening Files And Folders? LXer Syndicated Linux News 6 05-16-2010 09:06 AM
Segmenting archives into a variety of smaller archives. ktek Linux - Software 4 09-25-2008 04:47 AM
Click on Places>Search for Files> (I get a Nautilus has quit error) Balarabay1 SUSE / openSUSE 0 07-14-2006 08:44 AM
single click instead of double - opening folders dianat100 Mandriva 5 10-23-2005 04:44 PM
Google search click or enter? redhatrosh General 4 03-23-2005 11:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration