Disk Quota Exception while deleting the files


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Disk Quota Exception while deleting the files
# 1  
Old 02-03-2013
Disk Quota Exception while deleting the files

This is the full file name I get when I do ls -lt from my current directory.

Code:
EXPORT_v1x0_20120811_11_T_065800_070000.dat.gz


File names also consist of date as well. In the above file date is 20120811.

So I am trying to delete all the files which starts with EXPORT_v1x0 and whose date is less than 20120825.

I am using the below script from the command line to delete the files

Code:
    find . \( ! -name . -prune \) -type f -name "EXPORT_v1x0*" | awk -F'_' '$3<20120825' | xargs rm

But whenever I use the above command to delete the files, I always get this below exception.

Code:
    rm: ./EXPORT_v1x0_20120811_11_T_065800_070000.dat.gz not removed: Disc quota exceeded

Can anyone tell me what does this exception means? And how to overcome this problem?

I am running SunOS.


Code:
  bash-3.00$ uname -a
    SunOS lvsaishdc3in0001 5.10 Generic_142901-02 i86pc i386 i86pc

# 2  
Old 02-03-2013
Check this thread and try the solution provided by jim mcnamara
# 3  
Old 02-03-2013
Thanks for the help But should I add that truncation part in my script here? That's confusing me a lot.
# 4  
Old 02-03-2013
Quote:
Originally Posted by raihan26
Thanks for the help But should I add that truncation part in my script here? That's confusing me a lot.
> $fname is the truncation part. Just modify the script to read from your find command:
Code:
find . \( ! -name . -prune \) -type f -name "EXPORT_v1x0*" | awk -F'_' '$3<20120825' | while read fname
do
     > "$fname"
     rm "$fname"
done

# 5  
Old 02-03-2013
How about this, I do need the date part as well here-


Code:
find . \( ! -name . -prune \) -type f -name "EXPORT_v1x0*" | awk -F'_' '$3<20120825' | while read fname
do
     > "$fname"
     rm "$fname"
done

# 6  
Old 02-03-2013
Quote:
Originally Posted by raihan26
How about this, I do need the date part as well here
Yes, I edited my post to include that as well. I hope this helps.
# 7  
Old 02-03-2013
Code:
rm: ./EXPORT_v1x0_20120811_11_T_065800_070000.dat.gz not removed: Disc quota exceeded

Still same exception I got. Any other thoughts.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Linux

Disk quota exceed

There is a special problem for my unix. Disk quota exceed. I use quota -v to check that I almost run out of my quota(I use 45M, limit for me is 50M). However, I try to use du -sh * to locate my file, it shows me that I only use 9M. I'm wandering if there is something wrong. (3 Replies)
Discussion started by: yayayouknow
3 Replies

2. Emergency UNIX and Linux Support

Disk quota exceeded (difference btw. du and df, again!)

I haven't been able to do anything since yesterday evening because my account is full to the brim. Very annoying on a Friday evening when no admin will be in until Monday morning. Of course, I might consider cleaning up if I knew where the problem is, but I can't figure it out because du and df... (8 Replies)
Discussion started by: mregine
8 Replies

3. Red Hat

Disk usage showing 100% after deleting files also | Red Hat Linux 3.2.2-5

My Redhat Linux system is always showing 100& disk usage. I have removed almost all the files, but no use and I am always getting 100% disk usage.!! Filesystem 1K-blocks Used Available Use% Mounted on /dev/hda2 36337384 36066352 0 100% / I can... (7 Replies)
Discussion started by: sanoop
7 Replies

4. Red Hat

Implememting disk quota on Red Hat

Hi , what are all the files will be edited when we are\ implememting disk quota for a user. Thanks in advance (2 Replies)
Discussion started by: krish4linux
2 Replies

5. Shell Programming and Scripting

disk quota problem

Hi, I am executing following in the script file cat rampIdent.CARE*.txt | rsort.exe -T $BULK_TMP_DIR > rampIdent.ALL.tmp.txt The txt files are around 20 and each are of average size 60 MB. rsort.exe is a program that combines and sorts the input given to it and writes output onto... (2 Replies)
Discussion started by: vadi
2 Replies

6. UNIX for Dummies Questions & Answers

Disk Quota

Hi all, I am new to Unix admin. Can anyone tell me how to set disk quota for the users in /export/home directory? Pls specify the exact command. Thanks (1 Reply)
Discussion started by: solaris5.10
1 Replies

7. UNIX for Dummies Questions & Answers

Disk quota exceeded......

I keep on getting an error on my site saying I've got a 250GB dedicated server, and have used less than 200mb of that. The site has only been on the server for just over a month. What does this mean and how can I sort it? (8 Replies)
Discussion started by: thehaapyappy
8 Replies

8. UNIX for Dummies Questions & Answers

Increasing Disk Quota

I keep getting an error on my site that says: The server is a 250gb dedicated server so I would have thought I had more than enough space. What does this actually mean and can I increase the disk quota? Thanks (0 Replies)
Discussion started by: thehaapyappy
0 Replies

9. UNIX for Advanced & Expert Users

How can I increase the disk quota for a directory?

I know very basic Unix commands s I would really appreciate the assistance of a Unix guru. I am installing an application on a Sun server, when attempting to install I get an error that says I do not have enough space allocated for my install directory (/ACEMS). Error says it has 7235m but needs... (1 Reply)
Discussion started by: rhack
1 Replies

10. Linux

Disk Quota software for Linux

Hi all, Does anyone knows any good disk quota software for Linux? I am trying to assign different disk quota allocation for different users and directories. At moment I am using an FTP solution (Crush FTP, very good), I am able to specify quotas based on directories for each individual user, but... (3 Replies)
Discussion started by: KDE Man
3 Replies
Login or Register to Ask a Question