check how many files in folder or total files in folder


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting check how many files in folder or total files in folder
# 1  
Old 06-16-2009
check how many files in folder or total files in folder

Hi all,

I have copied all my files to one folder.and i want to check how many files (count) in the folder recently moved or total files in my folder?

please send me the query asap.
# 2  
Old 06-16-2009
Quote:
Originally Posted by durgaprasad
please send me the query asap.
What have you done to attempt to solve this problem yourself?

Post your sample script, and we'll see how we can assist.

Regards
# 3  
Old 06-16-2009
ls | wc -l
# 4  
Old 06-16-2009
Hello!

Per forum rules, and the benefit of all users, please search the forums before posting a question.

You can easily search the forums using our internal Google search engine or our advanced internal search engine. You can also search our huge UNIX and Linux database by user generated tags or search the database for unanswered questions and provide an answer.

Thank you.

The UNIX and Linux Forums
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Request for Shell script to move files from Subfolder to Parent folder and delete sub folder

Hi Team, I am new to shell script and there is a requirement where files should be moved from Subfolder to parent folder. Eg: parent folder --> /Interface/data/test/IN Sub folder -->/Interface/data/test/IN/Invoice20180607233338 Subfolder will be always with timestamp... (6 Replies)
Discussion started by: srivarun15
6 Replies

2. Shell Programming and Scripting

Shell scripting for moving folder specific files into target directory of that country folder.

I need help to write shell script to copy files from one server to another server. Source Directory UAE(inside i have another folder Misc with files inside UAE folder).I have to copy this to another server UAE folder( Files should be copied to UAE folder and Misc files should be copied in target... (3 Replies)
Discussion started by: naresh2389
3 Replies

3. Shell Programming and Scripting

Counting total files with different file types in each folder

Trying to count total files with different file types with thousands of files in each folder. Since some files do not have extensions I have to use below criteria. Count Total Files starting with --> "^ERROR" Count Total Files starting with --> "^Runtime" Count Everything else or files... (3 Replies)
Discussion started by: kchinnam
3 Replies

4. Shell Programming and Scripting

Total number of files in the folder should be listed

Hi All, When i give the ls -lrt to list out all files with total number of files , i get the output as ls -lrt total 72 -rw-r--r-- 1 hari staff 796 Jul 11 09:17 va.txt -rw-r--r-- 1 hari staff 169 Jul 13 00:20 a.log -rwxr-xr-x 1 hari staff 659 Aug... (9 Replies)
Discussion started by: Kalaihari
9 Replies

5. UNIX for Dummies Questions & Answers

[Solved] Touch 10% of the total files inside a folder

I'm trying to make this code below to work but I can't find the way to do the following: I want to make the script to touch only 10% of the total amount of files counted inside the given directory instead of all like it is now. I would greatly appreciate it if someone can give me a direction on... (9 Replies)
Discussion started by: regraphix
9 Replies

6. Shell Programming and Scripting

check existence of files in a folder

Hi I am having a problem to verify existence of files. I need to know whether or not files in a folder that begins with a name. For example all files that start with The_File_ *. I was doing it this way, but gives me error. if text -f /work/The_File_* then ... else .. fi (5 Replies)
Discussion started by: Rodrih92
5 Replies

7. Shell Programming and Scripting

Find all text files in folder and then copy to a new folder

Hi all, *I use Uwin and Cygwin emulator. I´m trying to search for all text files in the current folder (C/Files) and its sub folders using find -depth -name "*.txt" The above command worked for me, but now I would like to copy all found text files to a new folder (C/Files/Text) with ... (4 Replies)
Discussion started by: cgkmal
4 Replies

8. SuSE

Regarding Readable check for all the files in the folder

Currently we are doing the migration to unix to linux. I am facing the new problem kganeshb@its04489:~/scripts $ ls -l | more total 340 -rw-r----- 1 kganeshb users 9038 Oct 22 13:23 109_db.txt -rw-rw---- 1 dlc users 1413 Oct 10 17:40 1.txt -rw-rw---- 1 kganeshb users 45 Jan 28 13:46 a... (2 Replies)
Discussion started by: kingganesh04
2 Replies

9. Shell Programming and Scripting

script for Finding files in a folder and copying to another folder

Hi all, I have a folder '/samplefolder' in which i have some files like data0.txt, data1.txt and data2.txt. I have to search the folder for existence of the file data0.txt first and if found have to copy it to some other file; next i have to search the folder for existence of file... (5 Replies)
Discussion started by: satish2712
5 Replies

10. UNIX for Advanced & Expert Users

Auto copy for files from folder to folder upon instant writing

Hello all, I'm trying to accomplish that if a file gets written to folder /path/to/a/ it gets automatically copied into /path/to/b/ the moment its get written. I thought of writing a shell script and cron it that every X amount of minutes it copies these files over but this will not help me... (2 Replies)
Discussion started by: Bashar
2 Replies
Login or Register to Ask a Question