| char | meaning |
|---|---|
| * | match any characters |
| ? | match any single character |
| [ | begin a character group |
| ] | end a character group |
| - | denotes a character range |
| ! | negate a character group |
| | | logical "or" between patterns |
| ?(pattern) | match zero or one instance of pattern |
| *(pattern) | match zero or more instances of pattern |
| +(pattern) | match one or more instances of pattern |
| @(pattern) | match exactly one instance of pattern |
| !(pattern) | match any strings that don't contain pattern |
ls p*.c
lists all files that start with p and end in .c
ls prog?.c
lists all files that start with prog followed by any one
char and end in .c
ls prog+([0-9]).c
lists all files that start with prog followed by one or more digits
and end in .c
ls prog*([0-9])@(.f|.c)
lists all files that start with prog, followed by zero or more
digits, followed by .f or .c
Hard links
A direct pointer to a file. If the original file is moved the link remains valid. A file is accessible as long as any hard link to it remains.
Symbolic links
A pointer to a file name; can be used across file systems. If the original file is moved the link is invalid. Created with the -s option. Deleting the link does not delete the original file.
rm does
not notify user of the action that has occurred.
rm accepts a list of files to erase. rm *.c
erases all of the C
files, whereas rm * erases all of the files in the
working directory.
rm -i proga forces rm to query before erasing files.
†rm does not actually erase the file. rm removes the link to the file. When the last link to a file is removed UNIX then reclaims the file space (i.e., the blocks pointed to by the inode list are returned to the free list).
mv is also used to rename a file leaving the
location unaltered. †mv is implemented as ln and rm. A new link is established and then the old link removed.
u user (owner)
g group
o others
a all users
chown new-owner filelist
chgrp new-group filelist
Filesystem Total kbytes kbytes node kbytes used free used Mounted on /dev/rz2a 19743 10387 7382 58% / /dev/rz2g 294518 248466 16601 94% /usr
1058 ./eps 11 ./cursed.p 3 ./permsrec.p 76 ./printscreen.ps 93 ./menu.ps 1 ./.Xdefaults 1247 .
du -k shows usage in 1 K blocks.
cp is a tracked alias for /bin/cp
/bin/cp
$ sash
SASH System Administration Shell Version 2.05
Type 'help' for command list.
sash> help
check perform a filesystem check on the floppy
format format the floppy for mounting (specify
density as dd, hd, or ed)
halt halt the system
help display these helpful command descriptions
mount mount a floppy
owner change ownership to current user
quit exit SASH
raw format floppy for tar or cpio (specify
density as dd, hd, or ed)
reboot reboot the system
tarp set permissions for tar or cpio
umount synonym for 'unmount' command
unmount unmount the floppy
untarp reset permissions to normal after tar or
cpio
sash> format dd
disklabel: ioctl DIOCWDINFO: Device not configured
write error: 1439
wtfs: Input/output error
sash> raw dd
sash> format dd
/dev/rfd0a: 1440 sectors in 80 cylinders of 2 tracks, 9 sectors
0.7MB in 5 cyl groups (16 c/g, 0.14MB/g, 64 i/g)
super-block backups (for fsck -b #) at:
32, 336, 608, 912, 1184,
$ sash mount $ mount /dev/wd0a on / (local) /dev/fd0a on /sony (local) $ ls -a /sony . ..


The floppy file system is attached to /sony and is now considered part of the total file system. The /sony dir can be used with any UNIX commands the same as any other dir:
$cp p* /sony

$ sash owner