Setting up package management
# uname -a
OpenBSD serv0.cmsws.com 4.3 GENERIC#698 i386
# PKG_PATH=
ftp://ftp.usa.openbsd.org/pub/OpenBSD/4.3/packages/i386/∞
# export PKG_PATH
# pkg_add rsync
Different CLI options
find ./ -type f -name "*.jpg" | sed -e "s/\(.*\)/\"\\1\"/" | xargs rm
Crontab layout
When issued as "crontab -e" this is the correct format
minute (0-59)
| hour (0-23)
| | day of the month (1-31)
| | | month of the year (1-12 or Jan-Dec)
| | | | day of the week (0-6 with 0=Sun or Sun-Sat)
| | | | | commands
| | | | | |
#### Sunday at midnight
0 0 * * 0 /bin/sh somecommandhere
When modifying /etc/crontab this is the correct format
minute (0-59)
| hour (0-23)
| | day of the month (1-31)
| | | month of the year (1-12 or Jan-Dec)
| | | | day of the week (0-6 with 0=Sun or Sun-Sat)
| | | | | user account to run command as
| | | | | | commands
| | | | | | |
#### Sunday at midnight
0 0 * * 0 root /bin/sh somecommandhere
How to mount different things
First off make your mount points
# mkdir /mnt/cdrom
# mkdir /mnt/usb
# mkdir /mnt/hd2
1. mount CDROM at start up with /etc/fstab
# echo "/dev/cd0a /mnt/cdrom cd9660 ro,nodev,nosuid,noauto 0 0" >> /etc/fstab
# mount /mnt/cdrom
2. mount iso
# vnconfig svnd0 /usr/local/share/4.1.iso
# mount -t cd9660 /dev/svnd0c /mnt/cdrom
3. unmount iso
# umount /mnt/cdrom
# vnconfig -u svnd0
4. mount usb
# mkdir /mnt/usb
# mount_msdos /dev/sd0i /mnt/usb
5. unmount usb
# umount /mnt/usb
How to send email with telnet
- Open the cmd prompt. (Start -> Run or press win key + R, then type cmd and presss OK )
- Type telnet server.com 25 (where "server.com" is the remote mail server)
- Type HELO server.com. (Or "EHLO server.com")
- Type MAIL FROM:you@server.com.
- You may get a message saying "250 ok"
- Type RCPT TO:Friend1@anotherserver.com, friend_two@someotherserver.org, friend.3three@Someserver.com, etc.
- again, You may get a message saying "250 ok"
- To write the message, type DATA and press Enter.
- On the first line type SUBJECT:yoursubject and press Enter twice.
- Continue typing your message.
- Put a single period (.) on a line by itself and press Enter to send your message.
The server should say 'Message accepted for delivery'. (Or it says 250 OK id=`a long id`)
- Type QUIT to exit Telnet.
#################################
# Don't actually type the ...'s #
#################################
# telnet mail.server.com 25
...
EHLO mail.cmsws.com
...
MAIL FROM:me@mydomain.com
...
RCPT TO:you@yourdomain.com[, you2@yourdomain.com]
...
DATA
SUBJECT:My subject...
Here is my message.
It looks so good to me.
This is the last line.
. <- actually put a single period here, then press enter
...
How to check your email using telnet
- Select Start in the bottom left corner of the screen, then select Run.
- Once the Run window starts, type in cmd.
- At the command prompt, type in telnet emailprovider.com 110 (where "emailprovider" is the name of the service you use for email).
- Type USER yourusername (you may see what you type or not, and "yourusername" should be changed to whatever comes before the @ in your email address).
- Then type in PASS yourpassword (if you can see what you type, you will see your password).
- Type list.
- You will see a list of items with labels like "1 607" and "2 1323403."
- If you want to look at the message labeled 2 1323403, type retr 2. You can replace the 2 with any other number to view other messages.
- If you want to delete message 1 607, type dele 1.
- When you are done checking your email, type quit.
# telnet mail.cmsws.com 110
Trying 66.39.167.51...
Connected to mail.cmsws.com.
Escape character is '^]'.
+OK Dovecot ready.
USER jlucas@cmsws.com
+OK
PASS something
+OK Logged in.
list
... <snipped>
retr 1
... <returns message #1>
retr 2
... <returns message #2>
dele 2
... <deletes message #2>
quit <exits session>
There are no comments on this page. [Add comment]