LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-30-2011, 12:15 AM   #1
johnywhy
LQ Newbie
 
Registered: Aug 2011
Posts: 27

Rep: Reputation: Disabled
How To Get "# of files deleted" From RM Command At Terminal? [Solved]


hi

is there a way to get the terminal to display the number of files that were deleted by this statement?

Code:
find . -iname "*wine*" -exec rm -rf {} \;
thanks!

Last edited by johnywhy; 09-05-2011 at 10:05 PM.
 
Old 08-30-2011, 12:37 AM   #2
kurumi
Member
 
Registered: Apr 2010
Posts: 228

Rep: Reputation: 45
why don't you count them first, then do the delete?
 
1 members found this post helpful.
Old 08-30-2011, 12:47 AM   #3
johnywhy
LQ Newbie
 
Registered: Aug 2011
Posts: 27

Original Poster
Rep: Reputation: Disabled
because i want proof positive feedback that the files were actually deleted.

how could i count them?
 
Old 08-30-2011, 12:52 AM   #4
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Add the verbose option for rm and then pipe the output of your find command to "wc -l".
 
1 members found this post helpful.
Old 08-30-2011, 01:54 AM   #5
johnywhy
LQ Newbie
 
Registered: Aug 2011
Posts: 27

Original Poster
Rep: Reputation: Disabled
cool! now that's the kind of guru talk i like

thanks!
 
Old 09-05-2011, 11:14 AM   #6
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
It's not really "guru talk" and there may be better ways to do what you want..

Please mark the thread as solved if your question has been answered.
 
Old 09-05-2011, 10:28 PM   #7
johnywhy
LQ Newbie
 
Registered: Aug 2011
Posts: 27

Original Poster
Rep: Reputation: Disabled
well, to an ignoramus like me, Anybody who knows linux commands and their parameters is a guru. (it's probably not even called a "linux command", but i don't know the correct term!)

i put "solved" in the see, title.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] "Insert" & "Delete" key returns "~" in a terminal. sharky Linux - General 15 04-26-2011 09:36 AM
How to recover "Shift Delete" deleted files? gimmee Fedora 1 07-05-2007 06:07 AM
KDE deleted my files! A "copy to" tale of woe ChemBot Linux - General 1 08-27-2005 02:05 AM
Terminal command for GUI command "Remove to trash" GunSkit Linux - General 3 06-29-2004 02:50 PM
"segmentation error" when issuing "useradd" command through terminal with RH 9.0 kaihuang Linux - General 0 10-22-2003 12:47 AM


All times are GMT -5. The time now is 01:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration