Write to 1 failed [No space left on device]


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Write to 1 failed [No space left on device]
# 1  
Old 03-13-2015
Write to 1 failed [No space left on device]

I am getting error in a shell script having a simple date command.
Error is " write to 1 failed [No space left on device] ".
We saw that /tmp folder was 100% full. When we cleared some space in /tmp folder then script worked fine. Why does date command(or any other command) require space in /tmp folder? Which settings define this? Any information on this is appreciated.

Code:
> cat test.ksh
DATE_TMSTP=`date +%Y%m%d_%H%M%S`
> ksh test.ksh
test.ksh: line 1: write to 1 failed [No space left on device]

# 2  
Old 03-13-2015
what is your OS?
# 3  
Old 03-13-2015
OS version is "Red Hat Enterprise Linux Server release 5.10" . Thank you
# 4  
Old 03-13-2015
Is descriptor 1 (stdout) of your current shell redirected to something in /tmp?
Code:
test -t 1 && echo "ok: is terminal"

Do you have an ENV environment variable (where ksh sources its value at startup)?
Code:
echo $ENV

If yes, bypass it with
Code:
ksh -p test.ksh

Is ksh /bin/ksh?
Code:
type ksh

# 5  
Old 03-13-2015
Please find the details you have asked for:

1)
Code:
> test -t 1 && echo "ok: is terminal"
ok: is terminal

2) Nothing defined on $ENV

4)
Code:
> type ksh
ksh is hashed (/bin/ksh)

# 6  
Old 03-13-2015
I am running out of ideas...
One more:
Code:
type date

# 7  
Old 03-13-2015
thanks for your help anyway

Code:
$ type date
date is /bin/date

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Write to 1 failed [No space left on device] Error

Running a installation on Solaris 11 and getting error write to 1 failed If anyone can advise ? ORIGINAL_PATH="${PATH}" # prepend /usr/xpg4/bin to PATH as needed temporaryPath=`expr "${PATH}:" : '\(/usr/xpg4/bin:\)'` if then PATH="/usr/xpg4/bin:${PATH}" seem to have... (6 Replies)
Discussion started by: Mpumi
6 Replies

2. Linux

No space left on device while there is plenty of space available

Hello all posting here after scanning the net and tried most of the things offered still no solution that worked when I do : $ df -h Filesystem Size Used Avail Use% Mounted on footmpfs 7.9G 60K 7.9G 1% /dev tmpfs 7.9G 0 7.9G 0% /dev/shm /dev/da1 ... (3 Replies)
Discussion started by: umen
3 Replies

3. UNIX for Advanced & Expert Users

Sed: couldn't write 1378 items to stdout: No space left on device

Hi , In file first line start with "",when trying to remove using sed i am getting the below error .Please advise sed -e 's///g' -e 's/$]//g' segment1.txt >>segment_m1 sed: couldn't write 1378 items to stdout: No space left on device Thanks, Mohan (1 Reply)
Discussion started by: mohan705
1 Replies

4. AIX

Cpio: copy failed - No space left on device when I use rpm

Hello, I want to install GCC gcc-4.8.1-2.src.rpm for AIX 6.1 when I lance my command rpm -i gcc-4.8.1-2.src.rpm I have this error unpacking of archive failed on file gcc-4.8.1.tar.bz2: cpio: copy failed - No space left on device I checked the free space and I am surpise becouse I have... (7 Replies)
Discussion started by: tatab355
7 Replies

5. Linux

No space left on device when using rm

Hello people I have a small fileserver running busybox (very small linux distro with most essential stuff on it) and I am trying to remove some unused directories on it. When I try this: rm -R test/I get: rm: cannot remove 'test': No space left on devicedf shows: Filesystem ... (8 Replies)
Discussion started by: GTCG
8 Replies

6. Shell Programming and Scripting

No Space left On Device

Hi, We are trying to sort the 40GB file in unix and getting following error. Error: sort: can't write /var/tmp/stmAAAvsaGfJ.00002929: No space left on device sort -t ',' -k4 $DIR/INF_ff_FULL.dat >>$DIR/Sort_INF_ff_FULL.dat; 2>$DIR/sort_error.log Can you please advise how to... (2 Replies)
Discussion started by: koti_rama
2 Replies

7. Solaris

visudo: write error: No space left on device

Hi All, This is Sandeep Gupta, I am facing a problem with sudo command. Whenever i am executing the command "visudo" i am getting the error "visudo: write error: No space left on device". but i have checked on my Solaris Box everything is ok, i have enough free space on my box, and also... (13 Replies)
Discussion started by: Sandeepgupta
13 Replies

8. Solaris

No space left on device but free space and inodes are available...

hi guys, me again ;) i recently opened a thread about physical to zone migration. My zone is mounted over a "bigger" LUN (500GB) and step is now to move the old files, from the physical server, to my zone. We are talking about 22mio of files. i used rsync to do that and every time at... (8 Replies)
Discussion started by: beta17
8 Replies

9. UNIX for Dummies Questions & Answers

No space left on device

hello all, i have a proc binary that we run on unix environment, and it is generating this error '' tstfile(): No space left on device '' can you please assist on how to narrow down the problem? thanks (4 Replies)
Discussion started by: mjdbouk
4 Replies

10. UNIX for Dummies Questions & Answers

cat: write error: No space left on device

I am trying to create new files under my directory...but i getting the following message... cat: write error: No space left on device How do we handle this error. I am not getting this error when I login as the super user (3 Replies)
Discussion started by: igandu
3 Replies
Login or Register to Ask a Question