I have .rar file with .exe into it. So, how with command cmd I can open this .exe file without extract rar?
-
3Are you running Windows? – roaima Aug 11 '20 at 00:14
-
1simple answer: you can't. explanation: you might think that it's possible for other archives (like zip) - but that's not how it works. from a technical view every file is extracted in background (usually in temp folder) regardless of archive type. you weren't just aware of. you can however ask *how to extract a single file from archive via cmd line without extracting the whole archive* if you let us know what OS you are talking about (7z is such cmd line tool) – alecxs Aug 11 '20 at 11:12
1 Answers
Your question is very vague, but I'm going to take a stab at interpreting it and answering it. I'm not sure if you're even using Linux, as you seemingly want to examine a .exe without extracting it.
From what it looks like, you're wanting to see the contents of a .rar file without actually extracting it. You mentioned a command, but you don't really need one. If you want to play with .rar files in the terminal, there actually is a WinRAR for Linux.
However, there are multiple GUI applications that enable Linux users to open .rar files without extracting them. In this case, I'll go ahead and recommend "Archive Manager for Gnome", which used to be known as "File-Roller".
Chances are good that it's already in your default repositories, regardless of distro, and that it can be installed with your package manager - which you didn't mention, so I'm just going to assume it's Apptitude.
sudo apt install file-roller
Once installed, you can use it to open a .rar file on Linux without extracting the file inside. I recommend the above linked application. It's for Gnome, but doesn't pull in a lot of dependencies and should work well regardless of desktop environment.
If you do go the route of installing WinRAR for Linux, that's pretty easy as well. You can simply use the l switch and it will list the files inside the archive. It looks like this:
rar l filename.rar
You can read all about it in rar.txt included in the download.
- 447
- 1
- 3
- 9
-
Thanks, but I need command to open file without extract. For example. We have filename.rar and into it file.exe. I need run file.exe without extract filename.rar. What command can do that? – GOLDProFA Aug 11 '20 at 00:37
-
4You *have* to extract it to run it. You can't run an executable without extracting it, even if just temporarily. To do that, use the GUI - open the app, and then double-click on the enclosed executable. In that case, your system should automatically extract it to a temp file, where it'll remain until you close the executable process and then the application you used to open the .rar in the first place. – KGIII Aug 11 '20 at 00:42