The--ls of a small Linux command every day

Source: Internet
Author: User
Tags byte sizes

Command format
[Email protected] ~]#

rootSegment represents the current user, localhost is the host name
If it is a superuser, the current directory is the /root root directory, and if it is a normal user user1, the/home/user1
#Represents the current user bit super user, $ or normal user

Format:命令 【选项】【参数】

Query Directory Contents command

ls 【选项】【目录/文件】

ls -l ~/desktop[email protected]  3 jeff  staff     102  3  8 11:08  $RECYCLE. bindrwxr-xr-x   6 jeff  staff    204  4   9 16:13 a* algorithm drwxr-xr-x  10 jeff  staff    340   4  9 16:14 Learning_Python-rw-r--r--   1 Jeff   STAFF   1441  3 30 11:43 SSH Settings [email protected]  1  jeff  staff  48640  3  8 11:08 thumbs.dbdrwxr-xr-x   10 jeff  staff    340  4  9 18:07  myBooksdrwxr-xr-x  10 Jeff  staff    340  4  10 11:02  Graduation Specification [EMAIL PROTECTED]  1 JEFF  STAFF&NBsp;  6313  4  8 21:36  Internship Summary. MD 

-rw-r-r-
1th bit represents file type:-file d directory l soft link file
rw-  u owner class
r--  o Other NPC master Silly monk
r read  w writes  ls-lh becomes KB, easy to read

Ls-a ~/desktop$recycle. BIN. Ds_storelearning_pythonmybooks. LOCALIZEDSSH Set Graduation specification. A * algorithm Thumbs.db internship summary. MD

-aShow all files, including hidden files
-laShow all files in detail

Ls-ld ~/desktopdrwx------+ Jeff staff 408 4 17:07/users/jeff/desktop

-dShow Directory Properties
-ldShow directory properties in detail

If the directory does not have W permissions, even if the file has write permissions, you can not move the file, rename the operation, at this time, you need to add the directory W permissions: chmod +w (note that the CWD is this directory)


This article is from the "Storyteller under the Banyan Tree" blog, please be sure to keep this source http://woaijorden.blog.51cto.com/5299493/1972698

The--ls of a small Linux command every day

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.