File List

Non release banter
Jack
Contributor
Contributor
Posts: 1857
Joined: 09 Aug 2013, 14:25
Distribution: Porteus and Nemesis
Location: USA

File List

Post#1 by Jack » 08 Jan 2024, 05:42

Is there a some kind of script file to strip this kind file list?

Code: Select all

acl-2.3.1-3
acpid-2.0.34-1
acpid-openrc-20210506-1
archlinux-keyring-20230821-2
archlinux-mirrorlist-20230820-1
artix-keyring-20220901-1
artix-mirrorlist-20230809-3
attr-2.5.1-3
audit-3.1.2-1
base-3-1
This what I want to look like.

Code: Select all

acl 
acpid 
acpid-openrc 
archlinux-keyring 
archlinux-mirrorlist
artix-keyring
artix-mirrorlist
attr
I want to use the list to use with pacman if I can?
I just like Slackware because I think it teach you about Linux to build packages where Ubuntu is like Windows you just install programs you want.

User avatar
M. Eerie
Moderator
Moderator
Posts: 622
Joined: 31 Aug 2017, 21:18
Distribution: Nemesis Xfce/MATE x64

File List

Post#2 by M. Eerie » 08 Jan 2024, 09:31

In Archlinux/Artix/Nemesis, you can

get the list of your installed packages:

Code: Select all

pacman -Q
get the list of your outdated packages:

Code: Select all

pacman -Qu
get the list of your outdated packages without version number:

Code: Select all

pacman -Qqu
Also you can:

Code: Select all

checkupdates | awk '{print $1}'
which omits the packages declared in the line IgnorePkg in the file /etc/pacman.conf.

But sticking to your specific question, the generic solution is to use a regular expression
> Does not compute_ 🖖

https://forum.porteus.org/viewtopic.php?p=94310#p94310
https://forum.porteus.org/viewtopic.php?p=84002#p84002
https://forum.porteus.org/viewtopic.php?p=77174#p77174
https://forum.porteus.org/viewtopic.php?f=39&t=8584

itrukrakso
Black ninja
Black ninja
Posts: 62
Joined: 23 Jul 2022, 07:42
Distribution: Porteus 5.01_x86_64 Xfce

File List

Post#3 by itrukrakso » 08 Jan 2024, 12:45

Hi,
in the corresponding folder:

Code: Select all

find .$*\/* -printf "%f\n" | awk -F'-[0-9]' '{print $1}'

User avatar
M. Eerie
Moderator
Moderator
Posts: 622
Joined: 31 Aug 2017, 21:18
Distribution: Nemesis Xfce/MATE x64

File List

Post#4 by M. Eerie » 08 Jan 2024, 13:10

^

Code: Select all

$ echo openssl-1.1 1.1.1.w-1 | awk -F'-[0-9]' '{print $1}'
openssl
Note there are some packages whose name could be truncated...
In the example I give, there are both openssl and openssl-1 packages, which are not the same.
> Does not compute_ 🖖

https://forum.porteus.org/viewtopic.php?p=94310#p94310
https://forum.porteus.org/viewtopic.php?p=84002#p84002
https://forum.porteus.org/viewtopic.php?p=77174#p77174
https://forum.porteus.org/viewtopic.php?f=39&t=8584

Jack
Contributor
Contributor
Posts: 1857
Joined: 09 Aug 2013, 14:25
Distribution: Porteus and Nemesis
Location: USA

File List

Post#5 by Jack » 08 Jan 2024, 17:33

I found the one I used before.

Code: Select all

ls -1 /mnt/live/memory/images/001-core.xzm/var/log/packages > /tmp/001-pkg.txt
for a in $(cat /tmp/001-pkg.txt); do echo ${a%-*-*-*} >> /tmp/001-name.txt; done
I'm going to upload it to MediaFire so I don't lose it any more.
I just like Slackware because I think it teach you about Linux to build packages where Ubuntu is like Windows you just install programs you want.

User avatar
Ed_P
Contributor
Contributor
Posts: 8374
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

File List

Post#6 by Ed_P » 08 Jan 2024, 18:46

When I tested your script Jack I needed to include a "/" after "packages".
Ed

Jack
Contributor
Contributor
Posts: 1857
Joined: 09 Aug 2013, 14:25
Distribution: Porteus and Nemesis
Location: USA

File List

Post#7 by Jack » 09 Jan 2024, 16:19

Ed_P wrote:
08 Jan 2024, 18:46
When I tested your script Jack I needed to include a "/" after "packages".
This script was brokenman I use a few years ago that I just found by searching for it.

And thanks for finding the error.
I just like Slackware because I think it teach you about Linux to build packages where Ubuntu is like Windows you just install programs you want.

Post Reply