Everything. Create and delete directory/file commands

Source: Internet
Author: User

before I learn, I'm going to start with a couple of words. The philosophy of "all documents" is known in Linux If you are engaged in Linux programming can be very well understood this sentence to all files directory, character Device , block devices, sockets, printers, and other operations

Read and write can be fopen ()/fclose ()/fwrite ()/fread (), etc. function be processed. Shielding the hardware from the difference all devices are abstracted into files to provide a unified interface to the user. This is the idea of "everything is a document". Knowing this philosophy, we'll start by learning how to create delete directories and files

mkdir Create a directory/touch create a file

1. Create directory mkdir directory name

Create a mkdir-p directory name/directory name/.....

Display creation Information MKDIR-V directory name

2. Create file Touch Files file name


RM Delete directory/File

1. Delete file Rm-r files

Force Delete Does not display selection information RM-RF files

(There is a lot of content in the file without a choice of Yes or no direct delete)

2. Delete Directory RM directory name

3, the other-f-v and create the same meaning

Third,cp-r for the directory, and sometimes we use/BIN/CP
MV Rename or move, sometimes we use/BIN/MV when we are in the MV directory, if the target directory is present, the source directory will be moved to the target directory.

This article from "linux-learning-processes" blog, declined reprint!

Everything. Create and delete directory/file commands

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.