-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscoNotes
More file actions
533 lines (373 loc) · 17.3 KB
/
scoNotes
File metadata and controls
533 lines (373 loc) · 17.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
#!/bin/bash NOT A REAL SHELL SCRIPT!
# This is a cut'n'paste scriptlet
# be sure to read & understand what you're cutting & pasting!
#
# Found this on the web somewhere, can't remember where...
# ISO date stamp
`date +%Y%m%d-%H%M`
hwconfig -h Displays the hardware configuration
swconfig Displays the system contents database
hw (5.0.4 and above) Display detailed hardware config.
Reports available:
cpu, cpu_id, cpu_type
CPU model and speed
ram, mem, memory
System memory statistics
rom, bios
System ROM statistics
mp, gpi
Multiprocessor information
con, console, screen, keyboard, kbd, sound, audio, video, vid, graphics, graf, grafinfo
Console configuration
bus, all_bus, all_buss
Info on all CPU busses found
eisa, eisa_bus, eisa_buss
Info on EISA bus devices
isa, isa_bus, isa_buss, pnp, isa_pnp
Info on ISA Plug-and-Play devices
pci, pci_bus, pci_buss
Info on PCI bus devices
pcmcia, pcmcia_bus, pcmcia_buss
Info on PCMCIA bus devices
cfg, config
Configuration information
fixmog -i Checks all system files against file control database
isverify -I Rebuild ISAM database after system restore, need when
the following message is displayed :-
Error: Incorrect SCO Runtime System installed@
/etc/conf/cf.d/configure Tune kernel parameters
/etc/conf/cf.d/link_unix Relinks the kernel
asktime Used to set the time and date.
/usr/adm/ISL/iqm_file Contains serial number and activation key.
od (filename) Octal dump of a file
hd (filename) Hexadecimal dump of a file
custom # Menu for installing software
scoadmin # Administration menu (OSR5)
sysadmsh # Administration menu (3.2.4.2)
scologin disable #Disables graphical SCO login at startup (X)
scologin enables #Enables graphical SCO login at startup (X)
################################################################################
TERMINALS
################################################################################
ttylock (tty) Locks a named terminal
ttyunlock (tty) Unlocks a locked terminal
enable (tty) Turns on terminals
disable (tty) Turns off terminals
To setup a serial console, add SYSTTY=x into /etc/default/boot.
(Where x is 0 is display adapter and 1 is comm 1 etc)
################################################################################
NETWORK
################################################################################
hostname Displays hostname
hostname (hostname) Sets the hostname until next reboot
tcp start Starts TCP services
tcp stop Stops TCP services
nfs start Starts NFS services
nfs stop Stops NFS services
netconfig Menu for setting up network adapters
################################################################################
BACKUPS
################################################################################
CPIO ARCHIVE
------------
find (filesystem) -print | cpio -ocv > (filename or device)
eg find ./usr/ -print | cpio -ocv > /dev/rStp0
CPIO RESTORE
------------
cpio -ict < (filename or device) | more Lists archive
cpio -icdv < (filename or device)
cpio -icdv < (filename or device) ("files or directories to restore")
eg cpio -icdv < /dev/rStp0 "tcpip/*" Restore directory and contents
cpio -icdv < /dev/rStp0 "*resolve.conf" Restore a named file
TAR ARCHIVE
-----------
tar -cvf (filename or device) ("files or directories to archive")
eg tar -cvf /dev/rStp0 "/usr/*"
TAR RESTORE
-----------
tar -tvf (filename or device) Lists archive
tar -xvf (filename or device) Restore all
tar -xvf (filename or device) ("files or directories to restore")
use -p option for restoring with orginal permissions
use -A option for suppressing absolute file pathes #djn 5_01
eg tar -xvf /dev/rStp0 "tcpip" Restore directory and contents
tar -xvf /dev/rStp0 "tcpip/resolve.conf" Restore a named file
################################################################################
TAPE DRIVES
################################################################################
/dev/xct0 Cartridge tape controller
/dev/erct0 Error correcting cartridge tape
/dev/nrct0 No rewind cartridge tape
/dev/rct0 Cartridge tape
/dev/rStp0 SCSI tape
/dev/rctmini Mini catridge tape
/dev/rft0 QIC40 floppy tape
Cartridge rct0 nrct0 xct0
SCSI cartridge or DAT rStp0 nrStp0 xStp0
Mini cartridge rctmini nrctmini xctmini
/dev/r Rewinds on closing
/dev/nr No rewind on closing
/dev/x Control file used by the tape command, cannot be used for data
tape reten (device) Retension the tape
tape rewind (device) Rewind the tape
tape erase (device) Erase the tape
tape status (device) Is there a tape in the drive ?
tape unload (device) Eject a tape
tape getblk (device) Reads and reports the block size of the tape
tape -a (new block size) setblk (device) Sets the block size
If no device used the will use default in tape /etc/defaults/tape
dtype (device) Reports what type of data is on the devices (cpio, tar etc)
################################################################################
PRINT QUEUES
################################################################################
lpstat -t
lpstat -a Will display "text message"
reject (pqueue) Stops requests being placed in the queue
accept (pqueue) Enables requests to be placed in the queue
reject -r "text message" (pqueue)
disable (pqueue) Halts the queue, request will still be accepted
enable (pqueue) Enables the queue afte being halted
disable -r "text message" (pqueue)
/usr/lib/lpshut Stop the print sheduler
/usr/lib/lpsched Start the print sceduler
cancel (job id) Cancel a job that is queuing
lp -i (job id) -H hold Hold a job
lp -i (job id) -H resume Cancel the hold on a job
lp -i (job id) -H immediate Promote a job within a queue
lp -i (job id) -d(pqueue) Move a job between queues
$LPDEST Default queue variable
/etc/printcap Config file for print queues
/usr/spool/lp Contains local printers
/usr/spool/lpd Contains remote printers
################################################################################
HARD DRIVES
################################################################################
dkinit Displays non scsi disk details
scsibadblk Scans for bad tracks on disk
badtrk As as scsibadblk
fdisk Divides a hard disk into partitions
fdisk -p Displays partion information
fdisk -p -f (device) Displays partion information for named device
fdisk -p -f /dev/rhd00
################################################################################
FILE SYSTEMS
################################################################################
HTFS High Throughput filesystem
2 gig max file size
1 tera max file system size
1k block size
Not bootable
DTFS Desktop filesystem
2 gig max file size
1 tera max file system size
512 byte to 4k block size
Not bootable
EAFS Extended Acerfile file system
2 gig max file size
2 gig max file system size
1k block size
Bootable and default
AFS, S51K, XENIX <- Other bootable filesystems
divvy Divides disk partions into divisions for filesystems
divvy -N -P Displays division information
divvy -N -P (device) Displays division information for 2nd disk drive
divvy -N -P /dev/hd1a
fstyp (device eg /dev/root) Displays filesystem type
/dev/root Boot filesystem (/stand)
/dev/recover
/dev/root Root filesystem (/)
/dev/swap Swap space
fsck (device) Verify a file system, the file system must be unmounted,
except the /dev/root filesystem, you must be in single user
mode (init 1) or have booted from boot/root.
fsck -o full (device) Forces a full fsck.
fsck -y (device) Pre-answer questions either yes or no !
fsck -bs (device) Will recreate superblock
mkdev fs Screen for Creating and deleting filesystems
mount Lists all the mounted filesystems
mount (fs or device) Mounts a named filesystem
mountall Mounts all filesystems
mount -r -f ISO9660 -o lower /dev/cd0 /miscd # mounts a standard cd
fuser -u (/mount point) Lists who is using the filesystem
################################################################################
SWAP SPACE
################################################################################
swap -l Lists swap space and useage.
################################################################################
BOOTING
################################################################################
kernel Will display path and name of the kernel used to boot system
mount /dev/hd0root /mnt Mounts root filesystem over /mnt when you
have booting from boot/root floppies.
mount /dev/boot /mnt/stand Mounts boot filesystem.
Boot: hd(40)unix Boot floppy, load kernel from hard drive.
Used when /boot not found error
Boot: fd(64)unix root=hd(40) swap=hd(41) Unix from floppy, mount root
filesystems on hard disk.
Boot: unix.old Load the previous version of the kernel
(Must be in /stand {/dev/boot} directory)
Boot: dir Displays whats in /stand (/dev/boot)
Boot: bootos ? Lists partitions
Boot: bootos 4 Boot from a non-active partition
Boot: defbootstr btld=fd(61) link=alad325 Sdsk=alad(0,0,0,0)
btld Boot time loadable driver can be found at fd(61) b: drive,
defaults to fd(60) a: if not present.
link Uses driver alad325 from device specified in btld, driver
disks are unix filesystem disks.
Sdsk Device to use the boot time loadable driver with :-
alad is for the controller,
0 is host adapter
0 is bus on the adapter
0 is drive scsi id
0 is LUN
################################################################################
SCHEDULING
################################################################################
crontab -l List out crontab entrys
crontab -e Edit crontab entrys
crontab -l > (filename) Output crontab entrys to a file
crontab (filename) Enter a crontab from a file
crontab -r Removes all crontab entrys
crontab -v Displays crontab submission time.
/usr/lib/cron/cron.allow File containing users allowed crontab use.
/usr/lib/cron/cron.deny File containing users denied crontab use.
/usr/spool/cron/crontabs Directory containing users crontabs
at (now + 2 minutes, 13:05, etc) {return} Schedule a job using at
Command or schell script {return}
{CTRL D}
at -l
at -r (at job No)
/usr/lib/cron/at.allow File containing users allowed at use.
/usr/lib/cron/at.deny File containing users denied at use.
/usr/spool/cron/atjobs Directory contains users at jobs
################################################################################
SECURITY
################################################################################
chmod abcd (filename) Changes files/directory permissions
Where a is (4 SUID) + (2 SGID) + (1 SVTX)
b is (4 read) + (2 write) + (1 execute) permissions for owner
c is (4 read) + (2 write) + (1 execute) permissions for group
d is (4 read) + (2 write) + (1 execute) permissions for others
-rwxrwxrwx -rwxrwxrwx -rwxrwxrwx
||| ||| |||
- - -
| | |
Owner Group Others
-rwSrwxrwx = SUID -rwxrwSrwx = SGID drwxrwxrwt = SVTX
chown (new owner) (filename) Changes file/directory owners
chgrp (new group) (filename) Changes file/directory groups
umask Displays umask settings
umask abc Changes users umask settings
where ( 7 - a = new file read permissions)
( 7 - b = new file write permissions)
( 7 - c = new file execute permissions)
eg umask 022 = new file permissions of 755 = read write and execute for owner
read ----- and execute for group
read ----- and execute for other
passwd Change current user password
passwd -l (user) Lock a users account
passwd -u (user) Unlock a users account
goodpw Test to see if a passwd is acceptable.
pwck Checks /etc/passwd file for inconsistencies
grpck Checks /etc/group file for inconsistencies
################################################################################
USERS
################################################################################
env Displays values of environment variables
id Displays current user's uid and gid details
id (user) Displays user uid and gid details
who Displays details of all users currently logged in.
w
quot (filesystem) Displays disk useage by user
useradd
userdel (Note does not remove home dir)
rmuser
userls -l (username)
usermod
groupls Lists what groups you are in.
groupls (username)
groupls -a Lists all groups
groupmod
groupadd
groupdel
rmgroup
passwd (username)
rmpasswd
unretire (username) To reactivate a retired user
################################################################################
INIT RUN LEVELS
################################################################################
init (run level) Switches run levels
0 Shutdown
1 Single user
2,3,4 Multiuser
6 Reboot
haltsys
reboot
shutdown -g(number) grace period before starting shutdown
-y answer y to all further questions
-i(number) shutdown to run level
shutdown -y -g0 -i1 To shutdown to single user mode
shutdown -y -g0 -i6 To shutdown and reboot system.
who -b Displays when the machine was last booted
who -r Displays what the current run level is
################################################################################
SERIAL PORTS
################################################################################
com1 = /dev/tty1a (terminal/getty) or /dev/tty1A (dial out modem)
com2 = /dev/tty2a (terminal/getty) or /dev/tty2A (dial out modem)
enable /dev/tty1a Enables the getty on /dev/tty1a
disable /dev/tty1a Disables the getty on /dev/tty1a
(above edits both /etc/inittab and /etc/conf/init.d/sio files)
/etc/inittab
/etc/gettydefs
/etc/conf/init.d/sio Contains the defaults for the serial part of inittab.
Will recreate inittab from this when the environment
is rebuilt using link_unix.
################################################################################
ERROR LOGGING
################################################################################
/usr/adm/messages
################################################################################
PERFORMANCE
################################################################################
sar (delay) (repeats)
options :-
-r Displays amount of free memory and free swap
-d Displays disk and tape activity
-b Displays buffer activity
-u Displays cpu useage
swap -l Displays swap details and useage
/etc/conf/cf.d/configure -x Displays kernel parameters
sysdef
################################################################################
FLOPPY DRIVES
################################################################################
48ds9 360Kb 5.25 inch
96ds15 1.2Mb 5.25 inch
135ds9 720Kb 3.5 inch
135ds18 1.44Mb 3.5 inch
135ds36 2.88Mb 3.5 inch
| | |
| | +------ sectors per track
| +-------- ds = double sided
+---------- tracks per inch
/dev/rfd0135ds18 = floppy disk 0 3.5" 1.44Mb
format Formats disk for use.
mkdev fs Screen for creating root/boot disks or floppy filesystems
diskcp Disk to disk copy
diskcp -f Disk to disk copy with format first.
################################################################################
DOS DISKETTES
################################################################################
doscp
dosrm
dosdir List dos directories in dos dir style
dosdir /dev/fd0 or dosdir a:
dosls List dos directories in unix ls style
dosformat Format a dos floppy
dosmkdir Create a dos directory
dosrmdir Remove a dos directory
doscat
dtox (in file) > (out file) Dos to unix ascii file conversion
xtod (in file) > (out file) Unix to dos ascii file conversion