From: Brian Inglis <Brian.Inglis@Shaw.ca>
To: cygwin@cygwin.com
Subject: Re: 'tac' trying to use "/tmp"; Error: not found
Date: Mon, 3 Apr 2023 09:29:46 -0600 [thread overview]
Message-ID: <042bac58-c4c4-56c5-e2be-5b571d229f4a@Shaw.ca> (raw)
In-Reply-To: <CAB8Xom-zk0FKPjWdOnw1Ww_rh25YYhaRt-YuUJELj20PqNXNpQ@mail.gmail.com>
On 2023-04-02 21:22, marco atzeri wrote:
> On Sun, Apr 2, 2023 at 9:43 PM Prof. Luis G. Uribe C. wrote:
>> *| 'tac' utility dies with a not found "/tmp" error. |*
It is preferable to copy the exact command(s) and output into your problem
report. Presumably the input is a pipe or non-seekable device which needs
buffered in a temp file.
>> I didn't see this problem in older 'tac' versions...
>> I created "/tmp" under my root directory:
>> * "c:\tmp"* (Windows 10), *to no avail*.
>> I make a *tmp* dir directly *above*, in the *parent's 'tac' dir*:
>> *"../tmp"*, at the same level as other usual folders like:
>> *bin*, *dev*, *etc*, *lib*, *sbin*...,
>> and now: *'**tac' works fine**!*
The /tmp directory needs to be created in the Cygwin POSIX root directory "/".
[I am surprised GNU tac does not yet use mmap where available, as an alternative
to seek, as mmap has been around for decades, since 4.4BSD, SysVr4, and Solaris
2.0 days, and should be faster on huge files.]
> The expectation for the existence of /tmp directory is well founded
> https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard
> I assume by accident your installation pruned the directory.
> I will not be surprised if other programs also complain, not only tac
You can point to another dir under a shell (or export the env var) using e.g.
$ export TMPDIR=${TMP:-${TEMP:-/tmp}}
or
$ TMPDIR=. tac ...
If you have Cygwin bash and coreutils installed, under bash or a similar shell
with brace expansion you can restore the install directories with:
$ /bin/mkdir -pv -m 0755 /{bin,dev,etc,lib} \
/usr/{bin,lib,local/{bin,etc,lib},src}
$ /bin/mkdir -pv -m 01777 /dev/{mqueue,shm} /etc/fstab.d \
/{home,{,usr/}tmp} /var/{log,run,tmp}
$ /bin/mkdir -pv -m 0666 /var/run/utmp
see:
https://cygwin.com/git/?p=cygwin-apps/setup.git;a=blob;f=install.cc#l156
If the directories do not have the correct permissions, use chmod to fix them.
--
Take care. Thanks, Brian Inglis Calgary, Alberta, Canada
La perfection est atteinte Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer but when there is no more to cut
-- Antoine de Saint-Exupéry
prev parent reply other threads:[~2023-04-03 15:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAOoKcr3-vGedWvQWu8kmKJ48AfGpaqO0pHQG-KZFc2h+SAuKSw@mail.gmail.com>
[not found] ` <CAOoKcr3rB3cLPs+OX=qC0DVoS=pnbaOQH5HLxAa53bjb4mVwKQ@mail.gmail.com>
[not found] ` <CAOoKcr3gXr3QMT6sJkHC=jVsuFnXamOpdHJ3dt9=yCixYeAzrQ@mail.gmail.com>
[not found] ` <CAOoKcr2sX3LTPt__nkU0onVXpicDQUmEdSgv8L2UnR+KKv6sug@mail.gmail.com>
2023-04-03 1:42 ` Prof. Luis G. Uribe C.
2023-04-03 3:22 ` marco atzeri
2023-04-03 15:29 ` Brian Inglis [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=042bac58-c4c4-56c5-e2be-5b571d229f4a@Shaw.ca \
--to=brian.inglis@shaw.ca \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).