nixCraft Linux Forum

nixCraft

Linux Tech Support Forum

how to delete 0 bytes file

This is a discussion on how to delete 0 bytes file within the Linux software forums, part of the Linux Getting Started category; Dear All. what is the code to delete 1000 files of 0 bytes. Regards. Puppen[/code]...


Go Back   nixCraft Linux Forum > Linux Getting Started > Linux software

Register FAQ Members List Calendar Forgotten your password? Mark Forums Read
  #1 (permalink)  
Old 04-15-2007, 09:22 PM
Member
User
 
Join Date: Mar 2006
Posts: 63
Rep Power: 0
puppen
Default how to delete 0 bytes file

Dear All.

what is the code to delete 1000 files of 0 bytes.

Regards.
Puppen[/code]
__________________
someone somewhere is made for you.
LOVE is Journey not a destination.
ALL I want is EVERYTHING.
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 04-16-2007, 05:25 PM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
My distro: Ubuntu
Posts: 1,061
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

if you get two many files error use command and so on..
Code:
/bin/rm -f a*
/bin/rm -f b*
You can also put for loop;
Code:
for f in a b c d .... z
do
   /bin/rm -f $f*
done
__________________
Vivek | My personal blog
Linux Evangelist
Play hard stay cool
Reply With Quote
  #3 (permalink)  
Old 05-15-2007, 10:45 PM
Junior Member
User
 
Join Date: May 2007
Posts: 8
Rep Power: 0
NVRAM is on a distinguished road
Default

Quote:
Originally Posted by puppen View Post
Dear All.

what is the code to delete 1000 files of 0 bytes.

Regards.
Puppen[/code]
Please be more precise about your question, especially any errors or problems you have. It sounds like a homework problem.

Meanwhile, look a the "find" manual page (i.e.: man find) and pay attention to the -size and -type options. Then, look at the "xargs" page (i.e.: man xargs).
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Shell Delete Directory chimu Slackware 2 05-31-2008 04:36 PM
Shell Script to Automatically Delete a File via Cron Job kakarla Shell scripting 2 01-29-2008 09:54 AM
Shell script to delete a file with a dialog utility shankar100 Shell scripting 4 03-02-2007 11:22 AM
delete directory linux chiku Linux software 4 07-22-2006 07:56 PM
using sed to delete everything except needed patterns guest Shell scripting 8 09-12-2005 03:57 AM


All times are GMT +5.5. The time now is 01:24 AM.


Powered by vBulletin® Version 3.7.4 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36