Program mounting of NTFS hard disks in linux

Source: Internet
Author: User
In linux, you can program and mount an NTFS hard disk-general Linux technology-Linux technology and application information. For more information, see the following. You have to run commands every time you attach them to the hard disk. Do you think it is a little troublesome? If so, let's use a simple C program to implement a simple hanging method.
Vim mounts. c
// Add the following code:
# Include
# Include
Int main ()
{
Printf ("mounted on NTFS hard drive: \ n ");
System ("mount-t ntfs-3g/dev/sda1/media/C ");
System ("mount-t ntfs-3g/dev/sda5/media/D ");
System ("mount-t ntfs-3g/dev/sda6/media/E ");


}
Wq
// Save and exit
Gcc mounts. c-o mounts
// Compile the program
Then you can put the compiled mounts under/usr/bin lin-s/usr/bin/mounts
This is when mounting is successful wherever you enter the mounts hard disk. If you are still in trouble, create a startup item on the desktop. You only need to open the startup Item icon.
Of course, you can also package this program into rpm and install it on your system, once and for all! Haha!
After writing the above C program
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.