help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: HELP: Why bash fails to assign a variable when /tmp is full?


From: Andreas Kusalananda Kähäri
Subject: Re: HELP: Why bash fails to assign a variable when /tmp is full?
Date: Tue, 17 Mar 2020 08:05:46 +0100

On Tue, Mar 17, 2020 at 03:06:38AM +0000, Zhao, Landy (NSB - CN/Qingdao) wrote:
> Hello,
> I find that when /tmp is full, bash can't assign a value to a variable. Wile 
> it still can execute command.
> It occurs every time.
> 
> Does anyone know the reason?
> Can this behavior be changed? (seems no relationship with TMPDIR)
> 
> <centos-b:root>/root:
> # dd if=/dev/zero of=/tmp/ldt
> dd: writing to '/tmp/ldt': No space left on device
> 1023777+0 records in
> 1023776+0 records out
> 524173312 bytes (524 MB) copied, 1.66945 s, 314 MB/s
> <centos-b:root>/root:
> # df -h /tmp
> Filesystem      Size  Used Avail Use% Mounted on
> tmpfs           500M  500M     0 100% /tmp
> <centos-b:root>/root:
> # a=`ls`
> -ksh: write to 4 failed [No space left on device]

You're not running bash, you're running ksh.

The issue is either in storing some temporary output of the command
substitution before assigning it to your variable, or (and) it could
have something to do with ksh's history file management (if it uses
/tmp or not, I don't know), or something else the shell is using /tmp
for.  In any case, filling up /tmp will have all sort of negative
consequences.

-- 
Andreas (Kusalananda) Kähäri
SciLifeLab, NBIS, ICM
Uppsala University, Sweden

.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]