author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Tue, 28 Sep 2010 16:01:06 +0300 | |
changeset 588 | 59b4a51c5382 |
parent 519 | bf4dcc22ccd9 |
child 598 | 36edace509c9 |
permissions | -rw-r--r-- |
197
89a7852aa71b
Make label on FAT32 volume.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
1 |
-*- mode:outline; coding: utf-8 -*- |
89a7852aa71b
Make label on FAT32 volume.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
2 |
|
89a7852aa71b
Make label on FAT32 volume.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
3 |
* Make label on FAT32 volume. |
89a7852aa71b
Make label on FAT32 volume.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
4 |
|
89a7852aa71b
Make label on FAT32 volume.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
5 |
The volume name can be up to 11 characters long. |
89a7852aa71b
Make label on FAT32 volume.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
6 |
|
89a7852aa71b
Make label on FAT32 volume.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
7 |
$ sudo mlabel -i /dev/<device> ::my-label |
89a7852aa71b
Make label on FAT32 volume.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
8 |
|
89a7852aa71b
Make label on FAT32 volume.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
9 |
or when create FAT32 file system: |
89a7852aa71b
Make label on FAT32 volume.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
10 |
|
89a7852aa71b
Make label on FAT32 volume.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
11 |
$ sudo mkdosfs -n <vol-name> /dev/<device> |
89a7852aa71b
Make label on FAT32 volume.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
12 |
|
381
bce5618a8704
Convert file name coding.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
197
diff
changeset
|
13 |
* Convert file name coding. |
bce5618a8704
Convert file name coding.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
197
diff
changeset
|
14 |
|
bce5618a8704
Convert file name coding.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
197
diff
changeset
|
15 |
$ convmv --nosmart -f cp-1251 -t utf-8 -r $dir |
446 | 16 |
|
519
bf4dcc22ccd9
How get file time attributes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
447
diff
changeset
|
17 |
* How get file time attributes. |
bf4dcc22ccd9
How get file time attributes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
447
diff
changeset
|
18 |
|
bf4dcc22ccd9
How get file time attributes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
447
diff
changeset
|
19 |
POSIX define 3 file time attributes: atime (access time, only a few OS/fs update |
bf4dcc22ccd9
How get file time attributes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
447
diff
changeset
|
20 |
this parameter), ctime (attribute/inode modification time), mtime (modification |
bf4dcc22ccd9
How get file time attributes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
447
diff
changeset
|
21 |
time). |
bf4dcc22ccd9
How get file time attributes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
447
diff
changeset
|
22 |
|
bf4dcc22ccd9
How get file time attributes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
447
diff
changeset
|
23 |
To get time you can use 'ls' command but it print time in locale dependent |
bf4dcc22ccd9
How get file time attributes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
447
diff
changeset
|
24 |
irregular form: |
bf4dcc22ccd9
How get file time attributes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
447
diff
changeset
|
25 |
|
bf4dcc22ccd9
How get file time attributes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
447
diff
changeset
|
26 |
$ ls -l file.txt # last file modification |
bf4dcc22ccd9
How get file time attributes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
447
diff
changeset
|
27 |
$ ls -lc file.txt # last file status modification |
bf4dcc22ccd9
How get file time attributes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
447
diff
changeset
|
28 |
$ ls -lu file.txt # last access |
bf4dcc22ccd9
How get file time attributes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
447
diff
changeset
|
29 |
|
bf4dcc22ccd9
How get file time attributes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
447
diff
changeset
|
30 |
GNU coreutils provide more robust 'stst' utility: |
bf4dcc22ccd9
How get file time attributes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
447
diff
changeset
|
31 |
|
bf4dcc22ccd9
How get file time attributes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
447
diff
changeset
|
32 |
$ stat -c %Y file.txt # last file modification |
bf4dcc22ccd9
How get file time attributes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
447
diff
changeset
|
33 |
$ stat -c %Z file.txt # last file status modification |
bf4dcc22ccd9
How get file time attributes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
447
diff
changeset
|
34 |
$ stat -c %X file.txt # last access |
bf4dcc22ccd9
How get file time attributes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
447
diff
changeset
|
35 |
|
446 | 36 |
* File names. |
37 |
||
38 |
** POSIX. |
|
39 |
||
40 |
** Windows. |
|
41 |
||
447 | 42 |
http://msdn.microsoft.com/en-us/library/aa365247.aspx |
446 | 43 |
Naming Files, Paths, and Namespaces |