Learn Ubuntu File/folder Operations Command

Source: Internet
Author: User

New file: sudo touch mysql (file name)


The file attributes are read-only after the new file is created, and sudo gedit MySQL is required if you want to edit the file


Delete files: sudo rm mysql


To move a file:

1, first change the operation directory, cd/home/zhoum/download

2. Move files to the specified directory, sudo mv aaa (file name)/home/development

You can also move multiple files to the specified directory at the same time, separating the files with spaces.


To create a folder:

1. Enter the directory where you want to create the folder, Cd/home

2. Create folder, sudo mkdir mysql (name of folder)

If you are prompted no Talloc stackframe at: /source3/param/loadparm.c:4864, leaking memory

Type sudo pam-auth-update.


Delete an empty folder: sudo rmdir mysql


Delete a non-empty folder: sudo rm-rf MySQL, this time not only will delete files under the MySQL folder will also delete the folder.

Change filename, move file

sudo mv file1 file2 = file1 The file, change the file name to File2.

sudo mv file1 dir1 = file file1, move to directory Dir1, file name is still file1.

sudo mv dir1 dir2 = If the directory Dir2 exists, move the directory Dir1, and all of its files and subdirectories, to the directory Dir2, with the new directory name Dir1. If the directory Dir2 does not exist, the dir1, and all of its files and subdirectories, are changed to directory Dir2.

This article is from the "Programmer's Training" blog, make sure to keep this source http://zhoum1118.blog.51cto.com/10054110/1626419

Learn Ubuntu File/folder Operations Command

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.