1. The function description displays the contents of the specified working directory and lists the files and subdirectories contained in the working directory. This command is similar to dir under Windows
. In addition, Linux also provides the dir command, users can also use the dir command instead of the ls command. The syntax of ls is as follows: ls [options] [path or file] ls options are described in Table 4.1. Table 4.1 Options for ls and their meanings
Option Meaning-a Display all files and subdirectories under the specified directory, including hidden files (the files or directories at the beginning of “.” under Linux are considered as hidden documents) ) -d only displays the directory list, does not display the file -l In addition to the file name, the file, subdirectory permissions, user and size information are listed in detail -s output the file size after each file name - k Represents the size of the file in k-bytes -u sorted by the time the file was last accessed -t sorted by time -o displays details other than group information -x is output by column, horizontally sorted -r against directory To sort -q with ? instead of non-exportable characters -m horizontal output file name, and with “,” as a separator -S sort by file size -R list all subdirectories of files -pF in each A character is appended to the file name to indicate the type of the file. “*” indicates executable ordinary files, “/” indicates directory, “@” indicates symbolic links, “|
” indicates FIFOs, “=” indicates sockets -C is output by column, vertical sort -R lists files in all subdirectories -Q encloses the output file name in double quotes
2. For example, list the files in the /home directory and their subdirectories. # ls -l /home-rw-r--r-- 1 root root 0 Jul 7 22:39 db2drwx------ 3 mysql mysql 4096 Oct 10 2007 mysqldrwx------ 3 oracle oracle 4096 Oct 16 2007 oracle shows the details of all files and their subdirectories under /home/oracle, and displays the file type tags. # ls -alFtotal 56drwx------ 4 oracle oracle 4096 Jul 7 22:43 ./drwxr-xr-x 4 root root 4096 Jul 7 22:39 ../-rw------- 1 oracle Oracle 238 Dec 20 2007 .bash_history-rw-r--r-- 1 oracle oracle 304 Oct 16 2007 .bash_logout-rw-r--r-- 1 oracle oracle 191 Oct 16 2007 .bash_profile-rw-r--r -- 1 oracle oracle 124 Oct 16 2007 .bashrc-rw-r--r-- 1 oracle oracle 383 Oct 16 2007 .emacs-rw-r--r-- 1 oracle oracle 120 Oct 16 2007 .gtkrcdrwxr-xr- x 3 oracle oracle 4096 Oct 16 2007 .kde/drwxr-xr-x 2 root root 4096 Jul 7 22:41 .linux/lrwxrwxrwx 1 root root 10 Jul 7 22:43 mount -> /bin/mount*-rwxr- Xr-x 1 root root 4283 Jul 7 22:42 nfs*-rw-r--r-- 1 oracle oracle 22 Oct 16 2007 .rhosts
You all know what an IP address is, right? They are assigned to devices on the network to represent
Format: printf("\\033[word background color; font color m string \\033[0m" ); printf("
1. Disable root user login ssh #vi /etc/ssh/sshd_config Change PermitRootLogin yes to PermitRootLog
Just as Hong Kong is still engaged in tug-of-war on the issue of electronic textbooks for bookseller
Data transfer on the link layer of the linux protocol stack -sk
Usage of $(), $(()), and ${} in Shell
Linux LAMP service rpm package installation and configuration basic tutorial
Linux restart command reboot using tutorial
Discussion on GUEST OS Clock (TIMEKEEP) in Virtual Machine
Nginx configuration reverse proxy server
Startup tutorial for multiple Oracle instances under Linux platform
Fault location technology on Red Hat Linux
Win7 taskbar shortcuts how to center display
Win8 right-click taskbar icon shows how to solve the error?
How do you see how many operating systems you have?
SanDisk Releases First PCI-E Interface Solid State Drive "Lighting"
Windows7 default off time causes black screen how to do
How to clean the disk Windows7 Disk Cleanup Tutorial
How to reverse the network of Win7 system
How do computers add fonts? How to add personalized fonts to WinXP system