LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 12-12-2016, 01:07 PM   #1
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
multi installing .tgz files


I got a lot of .tgz files, I've saved from installing them into Slack. On a new install of slack, after post installation has been completed.

if is possible to install everything I have using something like this?
Code:
installpkg /run/media/userx/WD3TB/Slackware-tgz-files/*
seeing how everything within that directory is *.tgz files. Will slack be able to handle that, one file after the other until they are all installed?
 
Old 12-12-2016, 01:14 PM   #2
Gerard Lally
Senior Member
 
Registered: Sep 2009
Location: Leinster, IE
Distribution: Slackware, NetBSD
Posts: 2,177

Rep: Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761
Quote:
Originally Posted by BW-userx View Post
I got a lot of .tgz files, I've saved from installing them into Slack. On a new install of slack, after post installation has been completed.

if is possible to install everything I have using something like this?
Code:
installpkg /run/media/userx/WD3TB/Slackware-tgz-files/*
seeing how everything within that directory is *.tgz files. Will slack be able to handle that, one file after the other until they are all installed?
Here's one way of doing it:

Code:
cd /run/media/userx/WD3TB/Slackware-tgz-files/
for p in *.t?z
do
installpkg $p
done
 
2 members found this post helpful.
Old 12-12-2016, 01:18 PM   #3
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Original Poster
Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by gezley View Post
Here's one way of doing it:

Code:
cd /run/media/userx/WD3TB/Slackware-tgz-files/
for p in *.t?z
do
installpkg $p
done
this is going to be interesting. Thanks I see the logic and am going to give that a whirl.
 
Old 12-12-2016, 01:32 PM   #4
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
{install,upgrade,remove}pkg all work fine with wildcards (unless with that wildcard expansion you manage to surpass the limits of the shell, which on a 14.2 64bit install is over 2 million characters).

I've run commands such as upgradepkg --reinstall --install-new */*/*.t?z without any issues. The question mark in the extension allows for both .tgz and .txz packages.

I don't see any immediate reason to use a for loop unless you're looking at limiting what you're trying to install.
 
2 members found this post helpful.
Old 12-12-2016, 01:37 PM   #5
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Original Poster
Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by bassmadrigal View Post
{install,upgrade,remove}pkg all work fine with wildcards (unless with that wildcard expansion you manage to surpass the limits of the shell, which on a 14.2 64bit install is over 2 million characters).

I've run commands such as upgradepkg --reinstall --install-new */*/*.t?z without any issues. The question mark in the extension allows for both .tgz and .txz packages.

I don't see any immediate reason to use a for loop unless you're looking at limiting what you're trying to install.
no not really tying to limit it at all. file manager states 40 files. so that is like way within 2 million character limits.

so what I wrote too would work? I am making my USB Stick right now. as soon as that is done I will be installing slack.

Last edited by BW-userx; 12-12-2016 at 01:38 PM.
 
Old 12-12-2016, 01:49 PM   #6
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Yes, you can either cd into the directory and just type installpkg * or you can run it from wherever you're at and provide the full path installpkg /run/media/userx/WD3TB/Slackware-tgz-files/* like in your first example.

However, personally, I would always use a *.tgz, *.txz, or *.t?z just as a general guideline whenever I'm working with a specific type of files. I'm pretty sure pkgtools will ignore non-package files, but it's still a good practice to get into (especially with deleting things).

So, personally, I would do:

Code:
installpkg /run/media/userx/WD3TB/Slackware-tgz-files/*.tgz
 
1 members found this post helpful.
Old 12-12-2016, 02:24 PM   #7
RandomTroll
Senior Member
 
Registered: Mar 2010
Distribution: Slackware
Posts: 1,959

Rep: Reputation: 271Reputation: 271Reputation: 271
I started Slacking 20 years ago and do my own updates. I've never had a problem with
Code:
 installpkg *.t?z
.

All of my Slackware packages are .txz now; are they .tgz somewhere?
 
1 members found this post helpful.
Old 12-12-2016, 02:28 PM   #8
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Original Poster
Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by RandomTroll View Post
I started Slacking 20 years ago and do my own updates. I've never had a problem with
Code:
 installpkg *.t?z
.

All of my Slackware packages are .txz now; are they .tgz somewhere?
yes everything I built off of slackBuilds, I kept somewhere safe. for reinstall if I needed to so I would not have to do everything all over again.

so you must have been in the same directory when you ran that command?
 
Old 12-12-2016, 02:30 PM   #9
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Original Poster
Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by bassmadrigal View Post
Yes, you can either cd into the directory and just type installpkg * or you can run it from wherever you're at and provide the full path installpkg /run/media/userx/WD3TB/Slackware-tgz-files/* like in your first example.

However, personally, I would always use a *.tgz, *.txz, or *.t?z just as a general guideline whenever I'm working with a specific type of files. I'm pretty sure pkgtools will ignore non-package files, but it's still a good practice to get into (especially with deleting things).

So, personally, I would do:

Code:
installpkg /run/media/userx/WD3TB/Slackware-tgz-files/*.tgz
exactly, but I wrote it like that only because everything within that dir is tgz only. so it saves my fingers . lol
 
  


Reply

Tags
installpkg, tgz



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
Installing .tgz files. heigold1 Linux - Newbie 7 11-22-2012 06:38 PM
installing tgz files Dave31836 Linux - Newbie 11 11-02-2004 03:35 AM
Problems Installing TGZ and SH files Burtonsnow Linux - Software 4 04-15-2004 09:50 PM
Installing TGZ files Burtonsnow Slackware 5 04-15-2004 11:23 AM
installing .tgz files carlgulliver100 Linux - Software 4 02-15-2004 09:18 AM

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

All times are GMT -5. The time now is 06:16 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