"Linux Command"--(1) File directory Operations Command

Source: Internet
Author: User

File Directory Operations Command
+++++ File Directory Operations Command
+++++++++++++++++++++++++++++++
LS cd pwd mkdir RM rmdir mv CP Touch Cat nl more less head tail
+++++++++++++++++++++++++++++++
=============ls==============
ls [options] [directory] View directory information
Reference: http://www.cnblogs.com/peida/archive/2012/10/23/2734829.html
-------------------------------
Ls-c arranged by time from near
Ls-c-lt by Time, and show time
LS-C-L display time, sorted by file name
Ls-c by file name
Ls-i the inode number of the printed file
LS-SI/S lists the size of the file, in 1000-byte units
LS-L listing all information about a file
LS-M output formats separated by colons
LS-R reverse Order
Ls-r List all subdirectories
Ls-s by file size from large to small
Ls-u-t Sort by access time
Ls-u output by File system original order
Ls-v Sort by version
Ls-1 Show only one file per line
LS--version display version information and leave
------------------------------
Show details for all files
LS-RL [File path]


List details of directories beginning with D
Ls-l d*


List Sub-directories
ls-f [directory path] |grep/$


Listing sub-directories for more information
ls-l [Directory path] |grep "^d"


List the files that begin with D, and the sooner they are in the back.
Ls-ltr d*


Calculates the current file sibling directory number
Ls-l * |grep "^d" |wc-l


Calculates the current directory sibling file count
Ls-l * |grep "^-" |wc-l


List absolute paths to files
LS |sed "s:^: ' pwd '/:"


Lists the absolute paths of all files in the current directory, not recursion
Find $PWD maxdepth 1|xargs ls-l
-----------------------------
. It starts with a hidden file.
. Represents the current directory
.. Represents the parent directory






"Linux Command"--(1) File directory 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.