[Reprint address: http://keren.blog.51cto.com/720558/144896]The LS command in Linux is primarily responsible for displaying the following information about the file:
The inode value of the file, the permission information, the user and the group to which they belong, the last modification date, the filename, the number of links, and so on. module partition directory file list get module get all file list under File directory put file list into linked
Ls (listsegment) is used to list files. it is a frequently used command in Linux. Command amp; 26684; type: lsargsdira
LsList segment is a frequently used command in Linux.
Command format:Ls args dir
Args: Parameter;
Dir: Directory. if it is omitted, it indicates the current directory;
Common parameters and descriptions are as follows::
-A [common] lists all files in a directory, including hidden files starting.
-C: The time when the I node of the ou
Use perl to port ls commands in linux to windows-Linux general technology-Linux programming and kernel information. For more information, see the following. File: ls.rar
#! /Usr/bin/perl
Use strict;
# Use Win32: File qw (GetAttributes );
My $ dir = $ ARGV [1];
My $ count = 0;
My @ stack = ();
My @ ref = ();
My @ size = ();
My @ time = ();
My $ size;
My $ datestr;
My $ year;
My $ mon;
My $ day;
My $ hh;
My $ mm;
My $ ss;
If (defined (my $ opt
Under Linux, we use the most command should be LS, then, have you ever wondered how this command is implemented? In fact, after understanding the UNIX environment of the relevant interface, it is not difficult ~Goal:You can use LS to list the directory's abbreviated information, ls-l lists the details of the directory. The information under this working directory
Ls-l the LL command can view the properties of a file in a long format.The first part is the type of file, the main permission, the group permissions, other permissions, the second part of the number of hard links, the third part is the main, the fourth part of the group, the fifth part of the modified time, sixth part of the file name.The types of files are divided into:B-Block devices, C-character devices 、--Files, D-Directories, L-links,Zero, NULL,
[syntax]: LS [-RADCXMLNOGRTUCPFBQISF1] [directory or file ...][description]: The LS command lists the files under the specified directory, the default directory is the current directory./, the default output order is in alphabetical order by character.-R recursively lists the contents of each subdirectory-A lists all files, including the first character "." The Hidden file-D If the following parameter is a
Linux: ls displays the file size in the unit of K, M, and G # man ls ...... -H, -- human-readable print sizes in human readable format (e.g., 1 K 234 M 2G )...... # Lscuss. war nohup. out www.2cto.com # ls-ltotal 30372-rw-r -- r -- 1 root 31051909 May 24 10: 07 cuss. war-rw ------- 1 root 0 Mar 20 13:52 nohup. out # ls
Ls command implementation
In linux, the most commonly used command should be ls. Have you ever wondered how to implement this command? In fact, it is not difficult to understand the interfaces related to the UNIX environment ~Objectives:
You can use ls to list the brief information of a directory, and ls-l to list the
corresponding data blocks.File1------|Inode 3561|------|| Data blocks ||------Soft linkIn fact, it is like a pointer. For example, if the local file name is link1 and the corresponding inode is 1228, the content stored in data bloacks is a pointer to another file. For example, to point to another file, the value is file1 and the value of inode is 3561.
The soft link command is ln-s pathname target.For example, the preceding command is ln-s link1 file1.
Hard LinkIt is quite different from sof
What?List contents of a directoryHow? ls [ -A Bcfghlo [email protected] ghiklmnopqrstuwx1 ] [file ...]points--commonly used parametersLs-l Displaying details of directory files [properties of Linux files]Ls-t in reverse order by modified timeLs-r Reverse arranged in reverse orderLs-f identity File type /Presentation directory * indicates that the executable file @ means soft connect = Socket File | Rep
LS is the command to view files in directories and directoriesNow let's look at the use of this commandLsThe syntax of LS is mainlyLS View directory contentsLs-l Viewing folder detailsLs-a Viewing hidden filesLs-a view hidden files, but does not show "." and ".." Directory informationLs-d the directory as a file, rather than showing the file beneath itLs-h Display file size units (usually with other paramet
There is nothing to spare. Simply write and implement the simple LS command:| 1 #include Function:./ls--list files under current folder./ls xxx--lists the files under the specified folderIgnore. With.. Two of folders. Linux System Programming _1_ folder read (implement simple LS command)
LS: Displays the contents of the current directory-A: Displays all files, including "." Start of hidden files-A: Display except "." and ".." All files except the-L: Show details of a file or directory-I: Displays the index number of the file-D: Displays the properties of the directory, usually in combination with-l-H: When the file or directory size is displayed, the unit is converted, and the default is bytes. Usually used in conjunction with-lsuch a
, pipeline files, block files, character files and so on. Most of the time we deal with ordinary files and folders.File if the permissions according to the file can be divided into R (read), W (write), X (executable execute) file.Linux commands are executed in two ways:1. Enter Linux command execution directly in the Linux shell window.2. Write the command into the shell script file and execute the executable script.ls Command description:The first command that most people have access to Linux i
The LS command is the most commonly used command under Linux.The LS command is the abbreviation for list. LS is used to print out the list of current directories if LS specifies a different directory then the list of files and folders in the specified directory will be displayed. The
The LS command is the most commonly used command under Linux.The LS command is the abbreviation for list. LS is used to print out the list of current directories if LS specifies a different directory then the list of files and folders in the specified directory will be displayed. The
Http://www.cnblogs.com/peida/archive/2012/10/23/2734829.htmlThe LS command is the most commonly used command under Linux.The LS command is the abbreviation for list. LS is used to print out the list of current directories if LS specifies a different directory then the list of files and folders in the specified director
The LS command is the most commonly used command under Linux.The LS command is the abbreviation for list. LS is used to print out the list of current directories if LS specifies a different directory then the list of files and folders in the specified directory will be displayed. The
I am just a novice rookie, for the blog is also the first write, please many magnanimous, welcome everyone to point out the error 650) this.width=650; "src=" Http://img.baidu.com/hi/jx2/j_0057.gif "alt=" j_ 0057.gif "/>.ls is one of the most commonly used basic commands and the first command that most beginners learn when learning Linux, which is typically used to view files in the current directory or directory.The specific use of the command is as f
The LS command is the most commonly used command under Linux.ls command is the abbreviation of the list, the lack of saving LS used to print out the current directory of the list, if LS specifies a different directory, then the specified directory of files and folders will be displayed list.The LS command not only allo
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.