A shell command and script every day

Source: Internet
Author: User

Common Linux directory names
/The root directory of the virtual directory.
/bin binary Directory
/boot directory. Store startup files
/dev Device Directory
/etc System configuration Directory
/home directory, where Linux creates the user directory
/lib Library directory. Library files for system and application storage
/media Media directory, common mount points for removable media devices
/opt Optional directory, often used to store third-party software packages and data files
/proc process directory, storing information about existing hardware and current processes
/root Root User's home directory
/sbin system binary directory, storing many GNU administrator-level tools
/run run directory to store runtime data when the system is operating
/SRV Service directory for Local Service related files
/sys system directory, storage System hardware information related files
/tmp temp directory in which temporary working files can be created and deleted
/usr user binary directory, a large number of user-level GNU tools and data files are stored here
/var variable directory for storing frequently changing files, such as days files.
ADB command
Toggle File Directory
The directory path has two absolute and relative paths
An absolute path defines the exact location of the directory in the virtual directory structure, starting at the root of the virtual directory, equivalent to the full name of the directory
Absolute paths always start with a forward slash (/)
Example:/usr/bin

Using an absolute path can clearly indicate exactly where the user wants to switch to. To switch to a specific location in the file system with an absolute file path
Cd/usr/bin
Relative paths allow the user to specify a destination file path based on the current location.
directories accessed by the user can be accessed directly from the directory name in the current directory

CD Common methods
CD ~ Return home Directory

Cd.. Return to the top level directory

CD Back home directory

Scripting requirements: Create a file in the/tmp directory
Date: Date +%y%m%d
#!/bin/bash
Cd/tmp
Pwd
Touch 1.txt
CD ~

A shell command and script every day

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.