Problem with appending a file!


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Problem with appending a file!
# 1  
Old 12-08-2009
Problem with appending a file!

Hi All,

I have a script which i use in office. This script is used to log the work in users name.

For that in the script itself I have added that the infomration should append to the logfile everytime the script is run.

Code:
LOGFILE=/data/log/request1.txt

All these days it was working fine. But all of a sudden today morning i'm getting an error
Code:
" Cannot write to output: No space left on device "

But if try to add to that file manually it will add without any error.

manually in the sense not from Unix ( just opening that text file in windows and adding the information )

So that means if there is no space it should give error while adding information manually also right?

But in my case i'm getting that error only when i use unix script... what may be the problem? Please help...
# 2  
Old 12-08-2009
when you do a df -hk is the disk full ?

how large is the file right now?
# 3  
Old 12-08-2009
Please give me the output by below commands:

ls -l /data/log/request1.txt
ls -ld /data/log
df -k /data/log
# 4  
Old 12-09-2009
Oops with df -k i can see that the particular directory is 100% full... so because of that i'm getting that error then,,, but still how is it possible that i can edit that text file manually?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Appending content of a file to another file before a specific character

Hi there, i've got a file with this content $ cat file1 Matt Mar The other file has the same number of lines with this content: $ cat file2 20404=767294 23450=32427 is there a way with either using sed, awk or paste to insert the content of file1 before the "=" character? So... (3 Replies)
Discussion started by: nms
3 Replies

2. Shell Programming and Scripting

Appending 2 text files - Problem in windows

Hello, I have text files to append and am able to do with cat. cat file1 file2 >file3 and file3 works fine in UNIX (checked with vi and it looks fine) but when i open the same file in windows I see 2nd file appended as a single-line. In other words, all the lines of 2nd file appended to... (2 Replies)
Discussion started by: magnus29
2 Replies

3. Shell Programming and Scripting

Problem in appending text to a file located in remote server

ssh -q "server_name sudo echo 'dbagroup::1234' >> sudo /etc/group"if i execute the above code its not getting appended. my requirement is to login to remote server and append dbagroup::1234 in /etc/group i am able to achieve this with tee -a command want to know why its not working with >>... (5 Replies)
Discussion started by: chidori
5 Replies

4. Shell Programming and Scripting

Removing part of a file name and appending into a single file

I have two files like ABC_DEF_yyyyymmdd_hhmiss_XXX.txt and ABC_DEF_yyyyymmdd_hhmiss_YYY.txt. The date part is going to be changing everytime. How do i remove this date part of the file and create a single file like ABC_DEF_XXX.txt. (8 Replies)
Discussion started by: varlax
8 Replies

5. Shell Programming and Scripting

sed appending problem

i have a number of java files containing eg: --------------myfile.java-------------- package zip.fun.myfiles; import java.* import something..; import sdfdfdsa; ... ... -------------------------------------------- Now I need to append / insert a line as follows: ... (10 Replies)
Discussion started by: linuxadmin
10 Replies

6. UNIX for Dummies Questions & Answers

Appending timestamp problem

Hi, I am trying to insert a timestamp after all the file names in a folder,after the timestamp is created in the filename the file size is becoming zero bytes. please tell me where I am doing it wrong. I have declared the variable in starting of my script. timestamp=`date... (1 Reply)
Discussion started by: shruthidwh
1 Replies

7. Solaris

Problem in appending the correct log

Hi All, I have a perl module TrxLog.pm and following are codes in it #!/usr/local/bin/perl package TrxLog; %log_begin=""; %log_end=""; %log_msg=""; %log_start_time=""; %log_end_time=""; $ix=0; @arr_msg=""; if (! -e "TrxLog.txt"){ open (TRX,">TrxLog.txt"); }else{ ... (1 Reply)
Discussion started by: megh
1 Replies

8. Shell Programming and Scripting

Can someone kindly help with appending problem!!!

Hi guys,i urgently need help in this problem,i need to append one sentence to another line when it meet a certain word. For example: root: root time_last_login = 1191232080 root tty_last_login = /dev/vty0 root host_last_login = rep1nim root unsuccessful_login_count = 0 root... (10 Replies)
Discussion started by: cyberray
10 Replies

9. Shell Programming and Scripting

appending to sed output of one file into the middle of file

hi, i have a file file1 file2 ----------- ----------------- aa bbb ccc 111 1111 1111 ddd eee fff 222 3333 4444 ggg hhh... (5 Replies)
Discussion started by: go4desperado
5 Replies

10. Shell Programming and Scripting

AWK scripting problem - appending values

ABC:10:A1:ABCA110 ABC:10:A1:ABCA110 ABC:20:A1:ABCA120 DEF:20:D1:DEFD120 GHI:30:G1:GHIG130 GHI:40:G1:GHIG140 JKL:30:J1:JKLJ130 MNO:10:M1:MNOM110 What I'm trying to do is look through a file that consists of four columns (as above). As you can see there are duplicates in the file, i.e.... (2 Replies)
Discussion started by: rowntree
2 Replies
Login or Register to Ask a Question