Scenario: in the lab, all data of a project is stored on a hard disk of a machine for the convenience of project management, then, you can easily map the hard disk to a local disk by ing the network drive in windows, so that you can operate files in the remote hard disk just like operating the local disk. Today, I want to use linuxshell to count a directory on the remote disk (all files under this directory are crawled from the network, there are many files, and they are all small files, opening windows resource manager will be very slow, and you may accidentally
Scenario:
In the lab, all the data of a project is stored on a hard disk of a machine for the convenience of project management, then, you can easily map the hard disk to a local disk by ing the network drive in windows, so that you can operate files in the remote hard disk just like operating the local disk. Today, I want to use linux shell to count a directory of a remote disk (all files under this directory are crawled from the network, there are many files, and they are all small files, opening windows Resource Manager is very slow and may cause resource manager to crash. Therefore, you can use Linux shell to collect information about files in the directory. This requires how to map network drives in Linux.
Ing network drive in Ubuntu
Simply put, the mount command is used to mount the remote disk to a local directory. First, create a local directory to mount the remote disk. To facilitate identification, use the ip address (x. x) of the remote disk as the directory name. Then, run the mount command to mount: sudo mount // x. x. x. x/Data/home/lfqy/x. x. x. x/-o username = Administrator, password = 123. X. x. x. x is the ip address of the machine where the remote disk is located, and Data should be the drive letter (or drive name, which corresponds to the content mapped to the network drive in windows ), /home/lfqy/x. x. x. x/is the Mount directory where the remote disk is mounted to the local directory.-o uses the option to specify the user name and password of the host where the remote disk is located (generally, the user name in windows is Administrator, do not spell it wrong ). Press enter and enter the password to mount the file.
Test is available.
For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? Tid = 2