User`s manual

Dynamic C Users Manual digi.com 149
This shows the HELLO.TXT file that was created using the FAT_CREATE.C sample program. The file
length is 15 bytes. Cluster 2 has been allocated for this file. The “ls” command will display up to the first
six clusters allocated to a file.
The flag, rhsvdA, displays the file or directory attributes, with upper case indicating that the attribute is
turned on and lower case indicating that the attribute is turned off. In this example, the archive bit is turned
on and all other attributes are turned off.
These are the six attributes:
r
- read-only v - volume label
h
- hidden file d - directory
s
- system a - archive
To create a directory named DIR1, do the following:
This shows that DIR1 was created, and is 1024 bytes (size may vary by flash type).
Now, select DIR1:
Add a new file called RABBIT.TXT:
Note that the file name was appended to the current directory. Now we can write to RABBIT.TXT. The
shell program has predetermined characters to write, and does not allow you to enter your own data.
> ls
Listing '' (dir length 16384)
hello.txt rhsvdA len=15 clust=2
>
> mkdir dir1
Directory '/dir1' created with 1024 bytes
>
> cd dir1
PWD = '/dir1'
>
> touch rabbit.txt
File '/dir1/rabbit.txt' created with 1024 bytes
>
> wr rabbit.txt
File '/dir1/rabbit.txt' written with 1024 bytes out of 1024
>