Linux file directory structure experiment

Source: Internet
Author: User
Tags parent directory

taking the experimental environment of centos6.5 as an example

1. Create/tmp directory: A_c, A_d, B_c, B_d

[[email protected] tmp]# Mkdir-pv/tmp/{a,b}_{c,d}

mkdir: The directory "/tmp/a_c" has been created

mkdir: The directory "/tmp/a_d" has been created

mkdir: The directory "/tmp/b_c" has been created

mkdir: The directory "/tmp/b_d" has been created


Note:-P If no parent directory is automatically created,-V displays the workflow, not a required option.


2, create the/tmp/mylinux directory:


[Email protected] tmp]# mkdir-pv/mylinux/{bin,boot/grub,dev,etc/{rc.d/init,sysconfig/network-scripts},lib/ Modules,lib64,proc,sbin,sys,tmp,usr/local/{bin,sbin},var/{lock,log,run}}

\mkdir: The directory "/mylinux" has been created

mkdir: The directory "/mylinux/bin" has been created

mkdir: The directory "/mylinux/boot" has been created

mkdir: The directory "/mylinux/boot/grub" has been created

mkdir: The directory "/mylinux/dev" has been created

mkdir: The directory "/MYLINUX/ETC" has been created

mkdir: The directory "/MYLINUX/ETC/RC.D" has been created

mkdir: The directory "/mylinux/etc/rc.d/init" has been created

mkdir: The directory "/mylinux/etc/sysconfig" has been created

mkdir: The directory "/mylinux/etc/sysconfig/network-scripts" has been created

mkdir: The directory "/mylinux/lib" has been created

mkdir: The directory "/mylinux/lib/modules" has been created

mkdir: The directory "/MYLINUX/LIB64" has been created

mkdir: The directory "/mylinux/proc" has been created

mkdir: The directory "/mylinux/sbin" has been created

mkdir: The directory "/mylinux/sys" has been created

mkdir: The directory "/mylinux/tmp" has been created

mkdir: The directory "/MYLINUX/USR" has been created

mkdir: The directory "/mylinux/usr/local" has been created

mkdir: The directory "/mylinux/usr/local/bin" has been created

mkdir: The directory "/mylinux/usr/local/sbin" has been created

mkdir: The directory "/mylinux/var" has been created

mkdir: The directory "/mylinux/var/lock" has been created

mkdir: The directory "/mylinux/var/log" has been created

mkdir: The directory "/mylinux/var/run" has been created


Use the tree command to view the directory hierarchy we are currently creating

[Email protected] tmp]# Tree/mylinux

-bash:tree:command not found

Installing the tree command using the Yum-y install tree

[email protected] tmp]# Yum install-y tree


[Email protected]/]# Tree/mylinux

/mylinux

├──bin

├──boot

│└──grub

├──dev

├──etc

│├──rc.d

││└──init

│└──sysconfig

│└──network-scripts

├──lib

│└──modules

├──lib64

├──proc

├──sbin

├──sys

├──tmp

├──usr

│└──local

│├──bin

│└──sbin

└──var

├──lock

├──log

└──run


Directories, 0 files


Linux file directory structure experiment

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.