Go Back   The macosxhints Forums > OS X Help Requests > UNIX - Newcomers



 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
Old 01-18-2004, 06:06 PM   #1
detlef
Triple-A Player
 
Join Date: Dec 2003
Location: Tokyo, Japan
Posts: 71
Question how to count files in bash ?

Hi,

I would like to count the number of files in a folder using a small shell script. In AppleScript the code would look like this:

tell application "System Events"
set x to (number of files in folder "/Users/schmittdetlef/.Trash")
end tell

Can somebody please tell me how the equivalent command would look like in bash.

Thanks,
Detlef
detlef is offline   Reply With Quote
 

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT -5. The time now is 02:40 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Site design © Mac Publishing LLC; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of Mac Publishing LLC.