$ ls file1 file2 file3
$ ls -l total 3 -rw-r--r-- 1 guest users 8 Aug 4 15:56 file1 -rw-r--r-- 1 guest users 8 Aug 5 15:57 file2 -rw-r--r-- 1 guest users 8 Aug 4 15:57 file3
$ ls -lt total 3 -rw-r--r-- 1 guest users 8 Aug 5 15:57 file2 -rw-r--r-- 1 guest users 8 Aug 4 15:57 file3 -rw-r--r-- 1 guest users 8 Aug 4 15:56 file1
$ ls file1 file2 file3 $ cp file1 file4 $ ls file1 file2 file3 file4
$ ls file1 file2 file3 file4 $ mv file4 /tmp $ ls file1 file2 file3 $ cd /tmp [guest@linux /tmp]$ ls file4
$ ls file1 file2 file3 file4 $ mv file4 file5 $ ls file1 file2 file3 file5
$ ls file1 file2 $ rm file2 $ ls file1
$ ls file1 $ mkdir directory $ ls -lt total 2 drwxr-xr-x 2 guest users 1024 Aug 5 11:40 directory/ -rw-r--r-- 1 guest users 8 Aug 4 16:04 file1
$ ls directory/ file1 $ rmdir directory $ ls file1
$ cat file1 101 3people 2-DK 102 none 1-room 201 2people 2-DK 202 4people 3-LDK
| -c | Suppress normal output; instead print a count of matching lines for each input file. With the -v,-revert-match option (see below), count non-match |
|---|---|
| -v | Invert the sense of matching, to select non-matching lines. |
| -n | Prefix each line of output with the line number within its input file. |
$ cat file1 101 3people 2-DK 102 none 1-room 201 2people 2-DK 202 4people 3-LDK $ cat file2 301 4people 4-DK 302 3people 3-LDK 401 none 2-DK 402 2people 2-DK $ grep LDK * file1:202 4people 3-LDK file2:302 3people 3-LDK
[root@ns public_html]# ls -l -rw------- 1 hoge staff 163 Aug 7 22:39 index.html [root@ns public_html]# chmod g+r index.html [root@ns public_html]# ls -l -rw-r----- 1 hoge staff 163 Aug 7 22:39 index.html [root@ns public_html]# chmod 644 index.html [root@ns public_html]# ls -l -rw-r--r-- 1 hoge staff 163 Aug 7 22:39 index.html
# ps ax | grep dhcpd 278 ? S 0:00 /usr/sbin/dhcpd 7308 p1 S 0:00 grep dhcpd # kill 278 # ps ax | grep dhcpd 7310 p1 S 0:00 grep dhcpd
# kill `ps ax | awk '/pppd/ {print $1}'`
$ passwd Changing password for guest (current) UNIX password: New UNIX password: Retype new UNIX password: passwd: all authentication tokens updated successfully
$ man ls
LS(1) LS(1)
NAME
ls, dir, vdir - list contents of directories
SYNOPSIS
ls [-abcdfgiklmnpqrstuxABCFGLNQRSUX1] [-w cols] [-T cols]
[-I pattern] [--all] [--escape] [--directory] [--inode]
[--kilobytes] [--numeric-uid-gid] [--no-group] [--hide-
control-chars] [--reverse] [--size] [--width=cols] [--tab-
size=cols] [--almost-all] [--ignore-backups] [--classify]
[--file-type] [--full-time] [--ignore=pattern] [--derefer-
ence] [--literal] [--quote-name] [--recursive]
[--sort={none,time,size,extension}] [--format={long,ver-
bose,commas,across,vertical,single-column}]
[--time={atime,access,use,ctime,status}] [--help] [--ver-
sion] [--color[={yes,no,tty}]] [--colour[={yes,no,tty}]]
[name...]
DESCRIPTION
This documentation is no longer being maintained and may
......................................