Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Slackware 15 stucks

334 views
Skip to first unread message

Milky

unread,
May 6, 2021, 8:47:14 AM5/6/21
to


Hello again!

I wrote about over year ago about the same proplem ? I have a Fujitsu
Lifebook E744 with latest UEFI update (v.1.37 Phoenix). And it stucks
when I boot Slackware64-current-DVD.iso from my USB stick (USB 3.0 16
GB Transcend). I have tried both UEFI ja CMS mode and in both stucks
to keybord selection ? And both kernel options in boot (GRUB) menu ?
Don't have a DVD-drive in my computer that could try to boot from it.
Also tried out older versions of Slackware with same effect. Can any-
thing be done or should I forget Slackware ?


Thanks!


--Milky--

Milky

unread,
May 6, 2021, 9:07:15 AM5/6/21
to
Runs well on Oracle VirtualBox. Or should I be satisficed to run it
on virtualmachine ??


--Milky-

greymaus

unread,
May 8, 2021, 6:46:57 AM5/8/21
to
What does `stucks' mean?

I have installed Slack*15 to an old Thinkpad laptop with no problem. UEFI is a
pain in the ass.

Milky

unread,
May 9, 2021, 10:21:07 AM5/9/21
to
greymaus kirjoitti 8.5.2021 klo 13.46:

> What does `stucks' mean?
>
> I have installed Slack*15 to an old Thinkpad laptop with no problem. UEFI is a
> pain in the ass.


Is hang a better word in the English ? No problem with any other...


--Milky--



John McCue

unread,
May 9, 2021, 8:52:52 PM5/9/21
to
Yes, hang or froze (or frozen). I thought you said
'sucks' and was ignoring the post. I guess I am jaded
from being on usenet too long :) I will reread your
post and see what you are asking.

Btw 'stuck' without the 's' would have been OK too.

> --Milky--

John

John McCue

unread,
May 9, 2021, 8:59:09 PM5/9/21
to
Milky <mi...@milk.fi> wrote:
>
>
>Hello again!
>
> I wrote about over year ago about the same proplem ? I have a Fujitsu
> Lifebook E744 with latest UEFI update (v.1.37 Phoenix).

Never heard of this hardware, but is there an option
to select non-UEFI boot (like legacy) ?

Note if you have Windows on it and want to keep it,
doing that will break Windows.

Maybe this will help if you have not already seen it:

https://docs.slackware.com/howtos:slackware_admin:installing_on_uefi_hardware

<snip>
John

eho

unread,
May 11, 2021, 10:58:29 PM5/11/21
to
I too installed Current on several machines without problem, not using UEFI
but legacy and plain old lilo with ALMOST no problems.

Milky could you please post the last lines you see when the install hangs?

Once in the last weeks while installing Current the install SEEMED to hang
at a certain moment. When you start the setup program, you are in a
dialog display, and you are asked to install the software from a medium,
be it DVD or USB. Then you choose USB and the install process begins.

By default, the packages in the install process are displayed in a line
one by one. In my case at the end of this process, the display froze,
or hang. All I had to do was to enter "exit", and everything went fine.

Could it be something like that?

Cheers, Erich

ps. Did you consider bying an extern dvd drive? It is not that expensive,
but comes in handy sometimes...





--

c·o·m·p·e·l·l·e·i·n·t·r·a·r·e·at·p·o·s·t·e·o·.·m·e

Milky

unread,
May 14, 2021, 9:33:30 AM5/14/21
to
eho kirjoitti 12.5.2021 klo 5.58

> I too installed Current on several machines without problem, not using UEFI
> but legacy and plain old lilo with ALMOST no problems.
>
> Milky could you please post the last lines you see when the install hangs?
>
> Once in the last weeks while installing Current the install SEEMED to hang
> at a certain moment. When you start the setup program, you are in a
> dialog display, and you are asked to install the software from a medium,
> be it DVD or USB. Then you choose USB and the install process begins.
>
> By default, the packages in the install process are displayed in a line
> one by one. In my case at the end of this process, the display froze,
> or hang. All I had to do was to enter "exit", and everything went fine.
>
> Could it be something like that?
>
> Cheers, Erich

Last one before it hang is: Enter 1 to select a keybord map. There it
hangs ? Tried out also in legacy mode (CSM) and both kernel options
in GRUB menu but it hangs?




> ps. Did you consider bying an extern dvd drive? It is not that expensive,
> but comes in handy sometimes...

Yes, sure! I'm considering that!


--Milky--

PS. Tried out Current ISO file (14-5-2021).

John Forkosh

unread,
May 14, 2021, 11:42:27 PM5/14/21
to
Milky <mi...@milky.fi> wrote:
> eho kirjoitti 12.5.2021 klo 5.58
>
>> Milky could you please post the last lines you see
>> when the install hangs?
>
> Last one before it hang is: Enter 1 to select a keybord map.
> There it hangs ? Tried out also in legacy mode (CSM)
> and both kernel options in GRUB menu but it hangs?

Yeah, I have exactly the same problem; at least it hangs at
exactly the same place. Prints that "Enter 1..." message and hangs.
My box is an Asus VivoPC VM62N-G050R (purchased April 2015).

Weird thing is, I initially installed 14.1 from an external/usb
dvd drive, dual-booting with the pre-installed win8.1, and
everything worked perfectly, with elilo creating a new EFI
partition Slackware directory, etc, etc. And I happily ran
slackware for several years after that. No problems.

Then the weirdness... One day it went directly into the bios,
and the boot menu showed nothing. I'd had the small pc mounted
vertically behind a monitor, and it turned out the hard disk
was hanging from its sata connector, and had eventually worked
loose. No big problem...or so I thought. Re-seated the disk
(and put a makeshift shim in place to keep it seated).
But then it booted directly into win8.1. So I re-booted into
the bios, but now its boot screen only showed win, no slackware.

I was, and still am, able to boot usb sticks, one with gparted
and another with an arch-based "rescue system". And the EFI
partition looked fine to me, with its slackware directory
intact as far as I could tell. After several (actually many)
additional failed slackware boot attempts, I finally decided
to re-install from scratch. But now it hung at that "Enter 1...".

I tried several other releases, old dvd's from my external
drive, and newer ones I'd downloaded directly on a usb flash
drive (and which I'd successfully used on other boxes).
Same result every single time. So, guessing the EFI partition
was somehow corrupted, I swapped the original disk for a spare
sata drive I had lying around after reformatting it so it
was entirely clean. Same result. Then I tried removing the
hard disk entirely and booting the slackware install stick.
Same result.

The only guess left to me was that somehow the bios settings
had been mangled in some way that now prevented slackware,
but not other distros, from booting: the gparted and
"rescue system" sticks both booted without any problem.
And after intensive examination of the bios settings,
and numerous trials flipping them around, nothing worked.

So I downloaded an ubuntu iso onto a usb stick, and tried that
back on the original disk. Installed perfectly, without a single
hitch or slightest hiccup, and that's been dual-booting with
win8.1 ever since. Every once in a while I think I get an idea
and try booting a slackware install stick. But still no luck.

So, to repeat weird/goofy bottom line: slackware originally
installed and dual-booted with win8.1 just fine. But then
the disk accidentally worked loose from its sata connector.
And afterwards, the bios no longer recognized slack's EFI
image as a boot option, and re-install attempts hang at that
same "Enter 1..." message, exactly like you said.
--
John Forkosh ( mailto: j...@f.com where j=john and f=forkosh )

Milky

unread,
May 15, 2021, 9:00:59 AM5/15/21
to
eho kirjoitti 12.5.2021 klo 5.58:

> ps. Did you consider bying an extern dvd drive? It is not that expensive,
> but comes in handy sometimes...

I think that I'm gonna buy some external drive soon? Should I spent
some more money and buy Blue-Ray drive allready ? This laptop allready
has a DVD place. It's for ATAPI DVD-drive. I think that ATAPI-drives
can't find new ones anymore , only used ? Earlier I had A DVD drive
in this machine. But it got broken. Not only for that I can install
Slackware. I have DVD disks. Now I have Fedora 34 GNOME and also Win
10 in my SSD. This fedora is good!



Javier

unread,
May 15, 2021, 8:13:32 PM5/15/21
to
You can try with an USB stick from system rescue CD.

https://osdn.net/projects/systemrescuecd/storage/releases/5.3.2/systemrescuecd-x86-5.3.2.iso

From System Rescue CD you can do the partitioning yourself with
cfdisk, format it with mkfs.ext3 or mkfs.ext4 with and mount the
directory and copy the packages to that directory.

Slackware is so simple that it's possible to install it even without chrooting.
This does the installing from the shell instead of relying from the
slackware installation media.

It lacks the installation of lilo, but you can rely on SystemRescue CD
to boot a Slackware kernel, and retry the install of the bootloader later.

mkdir -p ${mounted_root_dir}
mount -t ext4 ${TARGET_root} ${mounted_root_dir}
mkdir -p ${mounted_root_dir}/boot
mount -t ext3 ${TARGET_boot} ${mounted_root_dir}/boot

slack_mirror="https://mirrors.slackware.com/slackware"
slack_arch=slackware64
slack_ver=15.0
slack_pkg_dir=/tmp/slack_download/pkgs
slack_kernel_dir=/tmp/slack_download/kernels

# Check again list of packages for 15.0. This is for 14.2
slack_pkgs="${slack_arch}/{a,ap,d,e,f,l,n,t,tcl,x,xap,y}
extra/bash-completion
extra/bittornado
extra/bittorrent
extra/dip-3.3.7p
extra/wicd
extra/xf86-video-fbdev
extra/getty-ps
extra/xv
extra/xfractint
pasture" # firefox, thunderbird, ampd
# kde,kdei,xfce, y (bsdgames), k (kernel src)

mkdir -p ${slack_pkg_dir}
pushd ${slack_pkg_dir}

for i in ${slack_pkgs}; do
wget -m --no-parent --no-host-directories \
${slack_mirror}/${slack_arch}-${slack_ver}/${i}
done
popd

mkdir -p ${slack_kernel_dir}
pushd ${slack_kernel_dir}
wget -m --no-parent \
${slack_mirror}/${slack_arch}-${slack_ver}/${slack_arch}/kernels
popd


cp ${slack_mirror}/${slack_arch}-${slack_ver}/${slack_arch}/kernels/huge.s/bzImage \
${mounted_root_dir}/boot/SLACK_HUGE_bzImage
cp ${slack_mirror}/${slack_arch}-${slack_ver}/${slack_arch}/kernels/huge.s/System.map.gz \
${mounted_root_dir}/boot/SLACK_HUGE_System.map.gz

pkgtools=$(find ${slack_pkg_dir} | grep 'pkgtools-.*z$')

# ${slack_mirror}/${slack_arch}-${slack_ver}/${slack_arch}/a/pkgtools-*.txz
grep -q 'txz$' <<< ${pkgtools_txz}
pushd ${slack_pkg_dir}
tar xJf ${pkgtools_txz}
# ${slack_pkg_dir}/sbin/installpkg
popd

find ${slack_pkg_dir} | grep 't.?z$' | xargs -n 1 \
${slack_pkg_dir}/sbin/installpkg --root ${mounted_root_dir}


Henrik Carlqvist

unread,
May 16, 2021, 3:01:07 PM5/16/21
to
On Sat, 15 May 2021 19:13:30 -0500, Javier wrote:

...

> mkdir -p ${slack_pkg_dir}
> pushd ${slack_pkg_dir}
>
> for i in ${slack_pkgs}; do
> wget -m --no-parent --no-host-directories \
> ${slack_mirror}/${slack_arch}-${slack_ver}/${i}
> done popd

...

> find ${slack_pkg_dir} | grep 't.?z$' | xargs -n 1 \
> ${slack_pkg_dir}/sbin/installpkg --root ${mounted_root_dir}

I havn't tried to install Slackware without using a more ore less
customized Slackware installation media myself. However, at the end of
the installation a number of configurations are done by running all
scripts in /var/log/setup

Some of the scripts in that directory are interactive, others simply do
what they need to do without any questions asked.

Examples of what those scripts do is to configure the boot loader and
network settings.

regards Henrik

Jimmy Johnson

unread,
May 16, 2021, 10:25:31 PM5/16/21
to
I found out I messed up a kernel upgrade early this morning, I
multi-boot so I booted mx-linux, it has a chroot gui app, ran it, it's
easy, choose the partition, sda7, click, cd boot and ran the complete
upgrade again, built the initrd, quit chroot, updated legacy grub and
booted the system like there never was a problem. I highly recommend
multi-booting.
--
Jimmy Johnson

Slackware64 Current - AMD A8-7600 - EXT4 at sda7
Registered Linux User #380263

Javier

unread,
May 17, 2021, 3:35:44 PM5/17/21
to
Henrik Carlqvist <Henrik.C...@deadspam.com> wrote:
>
> I havn't tried to install Slackware without using a more ore less
> customized Slackware installation media myself. However, at the end of
> the installation a number of configurations are done by running all
> scripts in /var/log/setup
>
> Some of the scripts in that directory are interactive, others simply do
> what they need to do without any questions asked.
>
> Examples of what those scripts do is to configure the boot loader and
> network settings.

When I first looked at the internals of the slackware installer it was
hard to me to find the installation scripts.

/var/log/setup is not the most evident place to put some scripts.

hier(7) says:

/var This directory contains files which may change in size, such as
spool and log files.

/var/log
Miscellaneous log files.

I guess Pat put the scripts in /var/log/setup when Slackware began in
the 90s, and later didn't want to change the location for fear of
breaking things (which in most cases is the right thing to do).

Other distros also had those kind of errors that were never corrected.
In the case of Debian comes to my mind the horrible desing of run-parts(1)
or the fact that /tmp is not in RAM.

Lew Pitcher

unread,
May 17, 2021, 3:46:10 PM5/17/21
to
On Mon, 17 May 2021 14:35:41 -0500, Javier wrote:

> Henrik Carlqvist <Henrik.C...@deadspam.com> wrote:
>>
>> I havn't tried to install Slackware without using a more ore less
>> customized Slackware installation media myself. However, at the end of
>> the installation a number of configurations are done by running all
>> scripts in /var/log/setup
>>
>> Some of the scripts in that directory are interactive, others simply do
>> what they need to do without any questions asked.
>>
>> Examples of what those scripts do is to configure the boot loader and
>> network settings.
>
> When I first looked at the internals of the slackware installer it was
> hard to me to find the installation scripts.
>
> /var/log/setup is not the most evident place to put some scripts.
>
> hier(7) says:
>
> /var This directory contains files which may change in size, such as
> spool and log files.
>
> /var/log
> Miscellaneous log files.
>
> I guess Pat put the scripts in /var/log/setup when Slackware began in
> the 90s, and later didn't want to change the location for fear of
> breaking things (which in most cases is the right thing to do).

IIRC, the upcoming 15.0 release moves Pat's setup files to another
location

Ahhh... here it is

Tue Jun 19 22:35:25 UTC 2018
testing/packages/pkgtools-15.0-noarch-20.txz: Rebuilt.
This update is a bit scarier than usual, so we're going to test it here
first and then move it into the main tree in a couple of days if there
are no serious bug reports. It's well-tested here, and works with the
slackpkg that's in -current now, but I don't know about slackpkg+ so that's
another reason to let it cool down here first. The purpose of this update
is to migrate the package database and directories from /var/log to
/var/lib/pkgtools. /var/log was never a good place for this data, as it is
considered by many to be a directory that could be wiped to free up some
space. Originally the package database was in /var/adm, but the FSSTND
(later FHS) group decided that directory should be a symlink to /var/log,
and I went along with that since it was years ago and I was a n00b and didn't
know any better. /var/lib/pkgtools will be a better and safer location.
The removed_packages and removed_scripts directories are really just logs
that aren't actually used for anything - those will remain under /var/log,
but moved into /var/log/pkgtools. Everything under /var/log will be
considered potentially non-permanent by the pkgtools - if any directories or
symlinks disappear from there, the pkgtools will automatically recreate them
as needed. In fact, the migration process will create symlinks from all the
old directory locations to the new ones, so anything that expects the old
locations (including slackpkg, for now) should continue to work. Once this
moves into the main tree, the plan is to fix other packages to use the new
installer script directory (/var/lib/pkgtools/setup) and change the installer
and slackpkg to use the new native locations for everything. When slackpkg
is changed over to use the new native locations, I'll also make sure to float
that in testing/ for a few days before moving it to the main tree to avoid
more unintentional disruption to slackpkg+ users.
Be aware that the package database migration is a one-way operation, but even
so if you later downgrade to an older version of the pkgtools it will still
work through the compatibility symlinks.

and

Thu Jun 21 22:58:42 UTC 2018
a/pkgtools-15.0-noarch-20.txz: Rebuilt.
Move pkgtools database to /var/lib/pkgtools/.
Move removed logs to /var/log/pkgtools/.

> Other distros also had those kind of errors that were never corrected.
> In the case of Debian comes to my mind the horrible desing of run-parts(1)
> or the fact that /tmp is not in RAM.




--
Lew Pitcher
"In Skills, We Trust"

Milky

unread,
May 26, 2021, 7:45:42 AM5/26/21
to
On 15.5.2021 16.00, Milky wrote:


>   I think that I'm gonna buy some external drive soon? Should I spent
>   some more money and buy Blue-Ray drive allready ? This laptop allready
>   has a DVD place. It's for ATAPI DVD-drive. I think that ATAPI-drives
>   can't find new ones anymore , only used ? Earlier I had A DVD drive
>   in this machine. But it got broken. Not only for that I can install
>   Slackware. I have DVD disks. Now I have Fedora 34 GNOME and also Win
>   10 in my SSD. This fedora is good!


Odered an ASUS BW-16D1H-U PRO Bluray external drive. BTW its Bluray
not BlueRay as I wrote earlier. Was not very cheap. Over 140 €. Hope
that will work O.K with Linux ? Now I have Garuda Linux. And see if
it boots allright with Slackare ? Waiting when it comes to mail
office....



Milky

unread,
May 28, 2021, 11:48:21 AM5/28/21
to
I got the drive from local post office today. It's now on an USB
3.0 port. Tried to boot from Current ISO (the latest) and it
hangs to "select keybord" ? I had an old DVD with Slackware 14.1
and that makes the same. DVD-disk are Maxell DVD +WR 4x speed.
Everyting other works fine. UEFI recognize drive as a DVD/CD
drive. Linux also recognize as a DVD/CD drive. Can boot also at
the drive. Gotta use this Garuda Linux with Gnode desktop ??


--Milky--




Milky

unread,
May 29, 2021, 10:45:42 AM5/29/21
to
Milky kirjoitti 28.5.2021 klo 18.48:

>        I got the drive from local post office today. It's now on an USB
>        3.0 port. Tried to boot from Current ISO (the latest) and it
>        hangs to "select keybord" ? I had an old DVD with Slackware 14.1
>        and that makes the same. DVD-disk are Maxell DVD +WR 4x speed.
>        Everyting other works fine. UEFI recognize drive as a DVD/CD
>        drive. Linux also recognize as a DVD/CD drive. Can boot also at
>        the drive. Gotta use this Garuda Linux with Gnode desktop ??

Some corrections: Should be DVD-disks not DVD-disk. And the
desktop is of course GNOME. But get back to Fedora 34 GNOME.
Also tried out of those old DVD-disk and they give errors
when ckecked out. And they are only 4x speed. Pretty slow.
Gotta get new disks. Probably some Blu-Ray disks and may be
some DVD disks ? Also tested USB stick with Slackware 15 on
my mom's Acer Aspire laptop (also UEFI) and it works O.K.
except the display was not good. But it boots up! Look like
it have something uncompatible in this Fujitsu laptop ??


--Milky--


#Paul

unread,
Jun 7, 2021, 2:32:05 PM6/7/21
to
Javier <inv...@invalid.invalid> wrote:
> or the fact that /tmp is not in RAM.

I'll have you know I have files over 5 years old in /tmp,
and I like it that way :-)

#Paul

Henrik Carlqvist

unread,
Jun 7, 2021, 3:57:27 PM6/7/21
to
On Mon, 07 Jun 2021 18:56:35 +0100, #Paul wrote:
> I'll have you know I have files over 5 years old in /tmp,
> and I like it that way :-)

I have added a custom cron script to remove files in /tmp older than 37
days and empty directories not touched in 37 days:

-8<---------------------------------

cat /etc/cron.daily/tmp-clean
#!/bin/sh
# Cleanup /tmp however, do not remove sockets for X

# No lost+found with reiserfs, but ext* has it...
find /tmp/lost+found -exec /bin/touch {} \;
find /tmp -type s -exec /bin/touch {} \;
find /tmp -type d -empty -mtime +37 -exec /bin/rmdir {} \;
find /tmp -atime +37 -exec /bin/rm {} \;

-8<---------------------------------

As the comment says in the script X might crash if sockets like
/tmp/.X11-unix/X0 is removed so the script starts by touching all sockets
to make sure that they are not removed.

regards Henrik

Grant Taylor

unread,
Jun 8, 2021, 6:37:37 PM6/8/21
to
On 6/7/21 1:57 PM, Henrik Carlqvist wrote:
> -8<---------------------------------
> #!/bin/sh
> # Cleanup /tmp however, do not remove sockets for X
>
> # No lost+found with reiserfs, but ext* has it...
> find /tmp/lost+found -exec /bin/touch {} \;
> find /tmp -type s -exec /bin/touch {} \;
> find /tmp -type d -empty -mtime +37 -exec /bin/rmdir {} \;
> find /tmp -atime +37 -exec /bin/rm {} \;
> -8<---------------------------------

Drive by comment: Be careful with filenames with spaces in them. I'd
suggest putting double quotes around the {} in the find -exec statements.



--
Grant. . . .
unix || die

Lew Pitcher

unread,
Jun 8, 2021, 7:06:11 PM6/8/21
to
GNU find(1) extends POSIX find(1) with a "-delete" action that does not
require exposing filenames to the shell. As such, it offers an alternative
to the OP's
find /tmp -atime +37 -exec /bin/rm {} \;
in
find /tmp -atime +37 -delete

For added security, I would rephrase the command to:
find /tmp -atime +37 -print -delete
to keep a record of files and directories deleted.

Rich

unread,
Jun 8, 2021, 8:43:08 PM6/8/21
to
The -exec option to find, using the ; terminator, also forks and
executes the command specified ones per filename found. That can be
avoided by using the + terminator "-exec /bin/rm {} +" instead, but I
prefer to pipe through xargs instead:

find /tmp -atime +37 -print0 | xargs -0 /bin/rm

With either the "+" or the xargs variant, only enough fork()/exec()'s
to delete all the found filenames are executed, instead of one for each
individual file.

Also, depending on disk seek performance (i.e., ssd vs mechanical disk)
the find pipe to xargs could very well run in parallel. The
fork()/exec() variant is either finding files, or deleting them, but
not both at the same time.

Grant Taylor

unread,
Jun 8, 2021, 11:18:15 PM6/8/21
to
I think both Lew's and Rich's comments are on target and very good.

Richard Kettlewell

unread,
Jun 9, 2021, 4:55:55 AM6/9/21
to
That’s not how shell quoting or find -exec work.

The real problem with these commands is that they contain a well-known
vulnerability. For details see:

https://www.gnu.org/software/findutils/manual/html_node/find_html/Race-Conditions-with-_002dexec.html

--
https://www.greenend.org.uk/rjk/

Grant Taylor

unread,
Jun 9, 2021, 11:07:10 AM6/9/21
to
On 6/9/21 2:55 AM, Richard Kettlewell wrote:
> That’s not how shell quoting or find -exec work.

Please elaborate.

> The real problem with these commands is that they contain a well-known
> vulnerability. For details see:

I completely agree that there is a timing component (race condition)
that can be a problem. But that's not the component I was speaking to.

Richard Kettlewell

unread,
Jun 9, 2021, 1:01:00 PM6/9/21
to
Grant Taylor <gta...@tnetconsulting.net> writes:
> On 6/9/21 2:55 AM, Richard Kettlewell wrote:
>> That’s not how shell quoting or find -exec work.
>
> Please elaborate.

I have too much RSI to repeat shell-quoting rules and the semantics of
find -exec. You will have to look them up.

--
https://www.greenend.org.uk/rjk/

Eli the Bearded

unread,
Jun 9, 2021, 2:44:03 PM6/9/21
to
In alt.os.linux.slackware, Richard Kettlewell <inv...@invalid.invalid> wrote:
> Grant Taylor <gta...@tnetconsulting.net> writes:
>> Drive by comment: Be careful with filenames with spaces in them. I'd
>> suggest putting double quotes around the {} in the find -exec
>> statements.
> That's not how shell quoting or find -exec work.

Agreed. Note that I'm using ksh and have PS2 set to <TAB> here:

$ cd /var/tmp
$ mkdir 'I
U+2665
trouble' && cd I*trouble
$ mkdir '`echo nana`'
$ touch '`echo nana`'/'
yikes
'
$ cd ..
$ find . -size 0 -type f -exec ls -ld {} +
-rw-rw-r-- 1 username username 0 Jun 9 11:35 './I'$'\n''U+2665'$'\n''trouble/`echo nana`/'$'\n''yikes'$'\n'
$

Since I'm using ksh, {} is not special to shell, and does not need
quoting. Since {} is safely replaced by find, whitespace and shell
metas in names is not an issue.

Elijah
------
did not actually include the unicode, just the U+codepoint

Henrik Carlqvist

unread,
Jun 9, 2021, 4:52:57 PM6/9/21
to
On Tue, 08 Jun 2021 23:06:09 +0000, Lew Pitcher wrote:

> On Tue, 08 Jun 2021 16:37:35 -0600, Grant Taylor wrote:
>
>> On 6/7/21 1:57 PM, Henrik Carlqvist wrote:
>>> -8<---------------------------------
>>> #!/bin/sh
>>> # Cleanup /tmp however, do not remove sockets for X
>>>
>>> # No lost+found with reiserfs, but ext* has it...
>>> find /tmp/lost+found -exec /bin/touch {} \;
>>> find /tmp -type s -exec /bin/touch {} \;
>>> find /tmp -type d -empty -mtime +37 -exec /bin/rmdir {} \;
>>> find /tmp -atime +37 -exec /bin/rm {} \;
>>> -8<---------------------------------

> For added security, I would rephrase the command to:
> find /tmp -atime +37 -print -delete
> to keep a record of files and directories deleted.

Thanks for all comments!

I will try:

find /tmp/lost+found -exec /bin/touch {} \;
find /tmp -type s -exec /bin/touch {} \;
find /tmp -type d -empty -mtime +37 -print -delete
find /tmp -atime +37 -print -delete

The record of deleted files will end up in emails to me. As this cron job
is being run on 50+ machines it will probably mean 50+ emails every
night. I might remove the -print if it gets too much to read...

regards Henrik

Grant Taylor

unread,
Jun 9, 2021, 8:19:39 PM6/9/21
to
On 6/9/21 2:52 PM, Henrik Carlqvist wrote:
> The record of deleted files will end up in emails to me. As this cron
> job is being run on 50+ machines it will probably mean 50+ emails
> every night. I might remove the -print if it gets too much to read...

(Pro)Tip: Have one string of text for success and another string of
text for failure. Then configure email client filtering to mark success
messages as read (and file them away). That way you can easily look at
the folder and see that the cron job is running like it should be. If
there ever is a failure, it will remain unread (maybe filed away, maybe
not) so that it will garner your attention to investigate the failure.

I've learned that it's really difficult to tell from afar if a
completely silent script is always succeeding or simply not running. I
dislike that.

Henrik Carlqvist

unread,
Jun 10, 2021, 1:18:49 AM6/10/21
to
On Wed, 09 Jun 2021 18:19:37 -0600, Grant Taylor wrote:
> I've learned that it's really difficult to tell from afar if a
> completely silent script is always succeeding or simply not running. I
> dislike that.

Thanks, yes, I share that experience. During the years it has happened
that the crond daemon has died completely. Fortunately all those machines
are also monitored by software which will tell if some important deamon
has died and/or if some partition is getting more than 90% full. I have
/tmp on a separate partition.

regards Henrik
0 new messages