nixCraft Linux Forum

nixCraft

Linux / UNIX 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

Linux answers from nixCraft.


Linux software General questions and discussion about Redhat/Fedora Core/Cent OS, Debian and Ubuntu Linux related to softwares should go here.

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 15-04-2007, 08:22 PM
Member
User
 
Join Date: Mar 2006
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
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
  #2 (permalink)  
Old 16-04-2007, 04:25 PM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
OS: RHEL
Scripting language: Bash and Python
Posts: 2,710
Thanks: 11
Thanked 245 Times in 184 Posts
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 Gite
Linux Evangelist
Be proud RHEL user, and let the world know about your enterprise choices! Join RedHat user group.
Always use CODE tags for posting system output and commands!
Do you run a Linux? Let's face it, you need help
Reply With Quote
  #3 (permalink)  
Old 15-05-2007, 09:45 PM
Junior Member
User
 
Join Date: May 2007
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
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


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 Off


Similar Threads

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


All times are GMT +5.5. The time now is 06:36 AM.


Powered by vBulletin® Version 3.8.5 - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
©2005-2010 nixCraft. All rights reserved

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 37 38