How to find the total number of files in a folder in linux via SSH?

0
59

 

In a Linux Directory file system, each and every folder, files, directories are treated as an inode. Linux system directories and files are structured in a tree-like structure. In Linux system, every data and programs are stored in the file and these files are structured in organized directories. A directory is nothing but a file that contains other files or folders (directories).

When a file is created, it can be fully and uniquely identified by the full name of the file, including all directories to which the files belongs. Through this way, a file can be easily identified for its proper operation of the system. When we want to count the total number files present inside the directory we can use the below command just by neglecting the -R recursive flag. It means that the counting should be done inside the particular opened directory.

If you want to know the overall file count under the particular user, you can run the below command.

Command to find the total number of files,

ls -RL | wc -l

LEAVE A REPLY

Please enter your comment!
Please enter your name here