LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-06-2007, 07:12 AM   #1
lchxr
Member
 
Registered: Mar 2006
Posts: 42

Rep: Reputation: 15
How to view the content of "slack-required" and extract from .exe files


Dear all,
I have two questions to ask here that are related to Slackware.

1. How to view the contents of "slack-required"?
In order to resolve the package dependency, I need to look at the contents of "slack-required" in .tgz file. The way I normally used is to explodpkg first in my $HOME. Is there any way to view the content without exploding first?

2. How to extract files from .exe files which are MS-Windows based compression format? Do I need to install any extra packages to support this?

Thanks
 
Old 06-06-2007, 07:33 AM   #2
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Rep: Reputation: Disabled
1) You can use tar for this: tar -x <path/to/file/to/extract> -f package.tgz
This will extract just the one file but as far as I know you can only view it by extracting

2) You can use wine for this

You can also list a tgz with: tar -tvf package.tgz

Last edited by dive; 06-06-2007 at 07:42 AM.
 
Old 06-06-2007, 07:50 AM   #3
wjevans_7d1@yahoo.co
Member
 
Registered: Jun 2006
Location: Mariposa
Distribution: Slackware 9.1
Posts: 938

Rep: Reputation: 31
You'll find the answer to your second question if you google this:

Code:
extract "exe files" linux
The answer lies within the first few entries. In fact, you won't have to follow any of the links. The answer is right there on the google search response page.

(It doesn't involve using wine, either; it's much simpler.)

The general moral of this story is that you can save yourself some time (and get your answers more quickly) by trying google first. Highly recommended!

dive answered the first question quite well. Here's a demo script I just cooked up:

Code:
#!/bin/sh

rm -rf tmp newplace some_package.tgz
mkdir tmp
mkdir tmp/a
mkdir tmp/a/b
echo "This is the content of slack-required." > tmp/a/b/slack-required
echo "This file represents the rest of the package" > tmp/a/b/other_stuff
echo "This file represents the rest of the package" > tmp/a/other_stuff
echo "This file represents the rest of the package" > tmp/other_stuff

echo "+++ about to make the package"
tar -chvzf some_package.tgz tmp
echo "+++ done making the package"

mkdir newplace
cd newplace

echo "+++ this is the file we wish to restore:"
tar -tzf ../some_package.tgz | grep slack-required
echo "+++ we are now going to restore that file"
tar -xvzf ../some_package.tgz $(tar -tzf ../some_package.tgz | grep slack-required)
echo "+++ done restoring that file"

echo "+++ that file is here (in theory there could be more than one slack-required, and we would find them all):"
find . -name slack-required
echo "+++ that file contains this data (in theory there could be more than one slack-required, and we'd display them all):"
cat $(find . -name slack-required)

echo "+++ this proves that we didn't also restore the other stuff:"
ls -R .
When you run that script, you may wish to pipe the output through less; it's 30 lines long.

Hope this helps.

Last edited by wjevans_7d1@yahoo.co; 06-06-2007 at 07:51 AM.
 
Old 06-06-2007, 08:52 AM   #4
simcox1
Member
 
Registered: Mar 2005
Location: UK
Distribution: Slackware
Posts: 794
Blog Entries: 2

Rep: Reputation: 30
You may be able to use zcat to view a file within a compressed archive, if you know the filename and path. eg:

zcat NAMEOFARCHIVE.tgz | cat PATHTOFILE
 
Old 06-06-2007, 10:06 AM   #5
TNWestTex
Member
 
Registered: May 2006
Location: Tennessee
Distribution: current, rawhide
Posts: 88

Rep: Reputation: 16
In kde, konqueror will open the archive and let you look at any of the files. You can copy individual files to wherever you would like. emacs and xemacs will also let you manipulate .tgz files.
 
Old 06-06-2007, 12:03 PM   #6
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
As for unpacking self-extracting .exe files under Linux, you may be able to use cabextract or orange, depending on which formnat they are -that is what tool they were created with.
 
Old 06-07-2007, 06:50 AM   #7
lchxr
Member
 
Registered: Mar 2006
Posts: 42

Original Poster
Rep: Reputation: 15
Many thanks for all response
 
  


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
squirrelmail "error in login page"" when content advisor is enabled simi_virgo Linux - Networking 4 08-21-2008 01:25 PM
xmame problems "ERROR: required files are missing" GT_Onizuka Linux - Games 14 09-19-2007 02:10 AM
"Wine" starts loading... then quits... Can't install ".exe" jabber32 Linux - Software 1 01-10-2007 06:06 AM
How can ı open ".exe" extended files ? bluesky2_1986 Linux - Newbie 7 07-19-2006 10:47 AM
In addition to "view new posts" about "View last 24 hours" KimVette LQ Suggestions & Feedback 3 10-30-2005 10:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:40 PM.

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