ls – 폴더의 리스트를 보여주는 명령어
ls?
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
[root@server html]# [root@server html]# ls code readme.html wp-blog-header.php wp-config.php wp-includes wp-login.php wp-signup.php index.php wp-activate.php wp-comments-post.php wp-content wp-links-opml.php wp-mail.php wp-trackback.php license.txt wp-admin wp-config-sample.php wp-cron.php wp-load.php wp-settings.php xmlrpc.php [root@server html]# ls -a . code wp-activate.php wp-config-sample.php wp-includes wp-mail.php xmlrpc.php .. index.php wp-admin wp-config.php wp-links-opml.php wp-settings.php .htaccess license.txt wp-blog-header.php wp-content wp-load.php wp-signup.php .well-known readme.html wp-comments-post.php wp-cron.php wp-login.php wp-trackback.php [root@server html]# ls -al 합계 196 drwx---rwx. 7 team free 4096 2016-05-20 10:09 . drwx-----x. 4 team free 4096 2015-12-23 16:28 .. -rw-r--r--. 1 team free 525 2015-12-11 18:17 .htaccess drwxr-xr-x. 3 root root 4096 2016-02-04 11:35 .well-known drwxr-xr-x 3 root root 4096 2016-03-08 18:09 code -rw-r--r--. 1 team free 418 2015-09-03 12:33 index.php -rw-r--r--. 1 team free 19930 2016-01-14 12:36 license.txt -rw-r--r--. 1 team free 7360 2016-05-07 04:26 readme.html -rw-r--r--. 1 team free 5035 2015-12-11 16:15 wp-activate.php drwxr-xr-x. 9 team free 4096 2015-11-07 09:00 wp-admin -rw-r--r--. 1 team free 271 2015-09-03 12:33 wp-blog-header.php -rw-r--r--. 1 team free 1369 2015-12-11 16:15 wp-comments-post.php -rw-r--r--. 1 team free 2853 2016-01-14 12:36 wp-config-sample.php -rw-rw-rw-. 1 team free 3053 2015-12-08 15:48 wp-config.php drwxr-xr-x. 7 team free 4096 2016-05-11 07:53 wp-content -rw-r--r--. 1 team free 3286 2015-09-03 12:33 wp-cron.php drwxr-xr-x. 16 team free 4096 2015-12-11 16:15 wp-includes -rw-r--r--. 1 team free 2380 2015-09-03 12:33 wp-links-opml.php -rw-r--r--. 1 team free 3316 2015-12-11 16:15 wp-load.php -rw-r--r--. 1 team free 33770 2016-01-14 12:36 wp-login.php -rw-r--r--. 1 team free 7887 2015-12-11 16:15 wp-mail.php -rw-r--r--. 1 team free 13021 2015-12-11 16:15 wp-settings.php -rw-r--r--. 1 team free 28594 2015-12-11 16:15 wp-signup.php -rw-r--r--. 1 team free 4035 2015-09-03 12:33 wp-trackback.php -rw-r--r--. 1 team free 3061 2015-12-11 16:15 xmlrpc.php |
[table caption=”ls option” colwidth=”150|” colalign=”center|left”]
옵 션 , 설 명
-R , 지정한 디렉토리이하에 있는 하부디렉토리와 파일들을 모두 포함 / Recursive
-r , 출력결과를 정열할 때에서 내림차순으로 정렬 / Descending
-S , 파일사이즈가 가장 큰 것부터 순서대로 나열
-l , 파일들을 나열할때 자세히 출력
-a , 경로안의 숨김파일을 포함하는 모든 파일을 나열
-h , 파일사이즈를 용량단위(Mb / Gb)를 붙여서 출력
-n , 파일의 소유자와 소유그룹을 표기할때 숫자로 UID / GID를 출력
-U , 디스크의 저장순서대로 파일을 나열
-i , 각 파일들의 색인번호(inode)를 각 행의 맨 앞에 출력
-1(숫자1) , 한 줄에 한 파일씩만 나열
-X , 확장자별로 정열하여 나열
-F , 파일의 종류별로 파일의 끝에 특수문자를 표시 / 폴더 : / | 파일은 아무런 표시 없음
[/table]
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
[root@server html]# ls --help 사용법: ls [<옵션>]... [<파일>]... List information about the FILEs (the current directory by default). Sort entries alphabetically if none of -cftuvSUX nor --sort. 긴 옵션에서 꼭 필요한 인수는 짧은 옵션에도 꼭 필요합니다. -a, --all do not ignore entries starting with . -A, --almost-all do not list implied . and .. --author with -l, print the author of each file -b, --escape print octal escapes for nongraphic characters --block-size=SIZE use SIZE-byte blocks. See SIZE format below -B, --ignore-backups do not list implied entries ending with ~ -c with -lt: sort by, and show, ctime (time of last modification of file status information) with -l: show ctime and sort by name otherwise: sort by ctime -C list entries by columns --color[=WHEN] colorize the output. WHEN defaults to `always' or can be `never' or `auto'. More info below -d, --directory list directory entries instead of contents, and do not dereference symbolic links -D, --dired generate output designed for Emacs' dired mode -f do not sort, enable -aU, disable -ls --color -F, --classify append indicator (one of */=>@|) to entries --file-type likewise, except do not append `*' --format=WORD across -x, commas -m, horizontal -x, long -l, single-column -1, verbose -l, vertical -C --full-time like -l --time-style=full-iso -g like -l, but do not list owner --group-directories-first group directories before files. augment with a --sort option, but any use of --sort=none (-U) disables grouping -G, --no-group in a long listing, don't print group names -h, --human-readable with -l, print sizes in human readable format (e.g., 1K 234M 2G) --si likewise, but use powers of 1000 not 1024 -H, --dereference-command-line follow symbolic links listed on the command line --dereference-command-line-symlink-to-dir follow each command line symbolic link that points to a directory --hide=PATTERN do not list implied entries matching shell PATTERN (overridden by -a or -A) --indicator-style=WORD append indicator with style WORD to entry names: none (default), slash (-p), file-type (--file-type), classify (-F) -i, --inode print the index number of each file -I, --ignore=PATTERN do not list implied entries matching shell PATTERN -k like --block-size=1K -l use a long listing format -L, --dereference when showing file information for a symbolic link, show information for the file the link references rather than for the link itself -m fill width with a comma separated list of entries -n, --numeric-uid-gid like -l, but list numeric user and group IDs -N, --literal print raw entry names (don't treat e.g. control characters specially) -o like -l, but do not list group information -p, --indicator-style=slash append / indicator to directories -q, --hide-control-chars print ? instead of non graphic characters --show-control-chars show non graphic characters as-is (default unless program is `ls' and output is a terminal) -Q, --quote-name enclose entry names in double quotes --quoting-style=WORD use quoting style WORD for entry names: literal, locale, shell, shell-always, c, escape -r, --reverse reverse order while sorting -R, --recursive list subdirectories recursively -s, --size print the allocated size of each file, in blocks -S sort by file size --sort=WORD sort by WORD instead of name: none -U, extension -X, size -S, time -t, version -v --time=WORD with -l, show time as WORD instead of modification time: atime -u, access -u, use -u, ctime -c, or status -c; use specified time as sort key if --sort=time --time-style=STYLE with -l, show times using style STYLE: full-iso, long-iso, iso, locale, +FORMAT. FORMAT is interpreted like `date'; if FORMAT is FORMAT1<newline>FORMAT2, FORMAT1 applies to non-recent files and FORMAT2 to recent files; if STYLE is prefixed with `posix-', STYLE takes effect only outside the POSIX locale -t sort by modification time -T, --tabsize=COLS assume tab stops at each COLS instead of 8 -u with -lt: sort by, and show, access time with -l: show access time and sort by name otherwise: sort by access time -U do not sort; list entries in directory order -v natural sort of (version) numbers within text -w, --width=COLS assume screen width instead of current value -x list entries by lines instead of by columns -X sort alphabetically by entry extension -1 list one file per line SELinux options: --lcontext Display security context. Enable -l. Lines will probably be too wide for most displays. -Z, --context Display security context so it fits on most displays. Displays only mode, user, group, security context and file name. --scontext Display only security context and file name. --help 이 도움말을 표시하고 끝냅니다 --version 버전 정보를 출력하고 끝냅니다 |