I Googled so much and can’t find any simpler method to count files or folders in a directory in Linux. I am using Ubuntu 14.04. If it’s only files and folders, it would be simple.
Count Files and Folders
$ ls -l | wc -l
wc -l command is read “WordCount lines”. It means after you executed the
ls, the corresponding result will be counted by it’s line. For example, if you are using
ls in your working directory, say there are 2 files and 2 folders, it will return 4 lines. If you add it becomes
ls -a, it will return 2 more lines. So, it returns 6 lines because of “.” and “..” are counted.
Continue reading Count Number of Files and Folders in a Directory Using Terminal
You can connect your VPS with SSH from your Ubuntu Terminal. You only need to install SSH Client on your Ubuntu by running this command on your Terminal.
Continue reading How to Connect VPS with SSH from Ubuntu Terminal
You can sign in as ROOT in Ubuntu Terminal without password in the first time by typing
After that you can change the password for the ROOT by typing
sudo passwd root
And then you type the password. Don’t afraid when you type there is no character appears because it is the default. It is recording what you type.
If you’ve changed the password you can sign as ROOT by typing
For further reading you can read Sudo Manual and SU Command in Wikipedia