» xsyntrex Xtreme Delusions (Redux): A Legend In My Own Mind

You should never use the adminstrator account as your default account or daily work (Windows, Linux, or otherwise). Among other things, this helps to minimize security risks, virus and malware effects, and stupid mistakes. When you need to do something as the administrator, in Linux you should use SUDO. In Windows 7 you can run a command as an administrator by doing the following:
More »

An ISO file is a CD or DVD image file. In order to attach an ISO file to the local file system, you have to mount it with a loop device. A loop device is used to make a regular file look like a block device.
The mount command is used to mount the device to the local file system.

mount -o loop,unhide,ro -t iso9660  
mount -o loop,unhide,ro -t udf

The “-o” option specifies extra parameters

loop use a loop device
unhide show hidden files
ro mount filesystem as readonly

The “-t” option specifies the filessytem to mount.

iso9660 CD-ROM filesystem
udf DVD Filesystem

The source parameters is the ISO.file. The target is the mount stub where the ISO file will be attached to the local filesystem.

References:
Anatomy of the Linux file system

You can create a function to call frequently used code from within a batch file. First make a label and then call it using the Call function.

@ECHO OFF
SETLOCAL

CALL:getHello
ECHO World

GOTO:EOF

:getHello
ECHO Hello

:EOF
ENDLOCAL

The output will look like this.

Hello
World

References:
DosTips.com

Batch files can use modifiers to get information about the file and its current path as well as passed in parameters.

This example uses a batch file named “test.bat” that exists in “C:\Test”.
To get the current drive letter:

@ECHO OFF
SETLOCAL

:: Get drive letter
ECHO %~d0

:: Get full filepath
ECHO %~f0

:: Get file name
ECHO %~n0

:: Get file extension
ECHO %~x0

ENDLOCAL

will return

C:
C:\Test\test.bat
test
.bat

You can modify these parameters to examine arguments as well.

References:
Microsoft Technet

To clear the OpenBSD console on logout, change the tty environment.
/etc/gettytab

    P|Pc|Pc console:\
            :np:sp#9600:

change to:

    P|Pc|Pc console:\
            :np:sp#9600:\
            :cl=\E[H\E[2J: