1
CISC3130, Spring 2013
- X. Zhang
Working with files CISC3130, Spring 2013 X. Zhang 1 Outlines - - PowerPoint PPT Presentation
Working with files CISC3130, Spring 2013 X. Zhang 1 Outlines Finish up with awk: pipeline, external commands Commands working with files tree, ls (-d option, -1 option, -R, -a) od (octal dump), stat (show meta data of file)
1
2
3
e.g., !239
E.g., !g++
4
pipe_mail.awk Todo: 1. 2.
5
6
7
ln -s /path/to/file1.txt /path/to/file2.txt
Numerical subdirectories exist for every process.
For example, /dev/stdin, /dev/tty*
8
a: named character, c: ASCII character or backslash representation d[size]: signed decimal, size bytes per integer o[size], octal ; x[size], hexadecimal
9
10
11
diff’s output is carefully designed so that it can be used by other
12
Creation and management of private keys, public keys and parameters Public key cryptographic operations Creation of X.509 certificates, CSRs and CRLs Calculation of Message Digests Encryption and Decryption with Ciphers SSL/TLS Client and Server Tests Handling of S/MIME signed or encrypted mail Time Stamp requests, generation and verification
13
14
In 2005, researchers were able to create pairs
15
Examples: RSA, DSA algorithms
If Alice wants to sign an open letter, she uses her private key to encrypt it. Bob
If Alice wants to send a letter to Bob that only he can read, she encrypts it
16
17
18
19
a lock file to indicate that a program is already running, and that a second
to record a file timestamp for later comparison with other files.
20
21
mktemp replaces them with an alphanumeric string derived from
22
23
24
locate [OPTION]... PATTERN...
-t option: report if a name is an alias, shell reserved word, function, builtin,
25
26
27
files and directories to search (directories are (almost) always descended into recursively) Options: select names for ultimate display or action
$find -ls -type f -fprint /tmp/mytemp 23724924 4 drwxr-xr-x 2 zhang staff 4096 Mar 25 22:40 . 23724925 0 --wx------ 1 zhang staff 0 Mar 25 22:35 ./a 23724927 0 -rw-r--r-- 1 zhang staff 0 Mar 25 22:35 ./b 23724928 4 -rw-r--r-- 1 zhang staff 10 Mar 25 22:40 ./tmp [zhang@storm testfind]$ more /tmp/mytemp ./a ./b ./tmp
28
Unsigned integer: exactly that many days old Negative: less than that absolute value Positive: more than that value
Unsigned: an exact match on the permissions is required. Negative: all of the bits set are required to match. Positive: at least one of the bits set must match,
E.g., +700 //user can read, or write, or execute …
find . ! –perm -400
29
30
31
32
HTML to XHTML, standardized XML-based version of HTML
33
Note: why /dev/null here? Potential problems: command line might exceed system limit =>
34
35
36
37