Listing files and folders within a given folder is one of the easiest and simplest SSH commands. Of course, we shall begin by logging in to the server using SSH.

To list files and folders within the current directory one is operating in, simply enter the following command in your SSH window followed by the Enter key.

ls

To list files and folders within any given folder or directory, simply use the following command:

ls /path/to/folder

For example, to list files and folders in the directory /home/coconut, use the command:

ls /home/coconut

Now that you know how to list files and folders in any given folder or directory on your server using SSH, it's time for you to order your dedicated server or virtual server from Jubilee Web Host.

  • Folders, Files, SSH
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to Delete a File or Folder Using SSH

To delete a file or folder using SSH, we use the rm command accompanied by some options as the...

How to Delete Files and Folders Using SSH Without Confirmation

In our previous article, we showed you how you can delete a file, folder or even sub-folders...

How to Remove/Uninstall an RPM Package Using SSH

If you want to remove/uninstall a package using the RPM utility, we highly recommend that you do...