DirectoryComputersBlog Details for "My SysAd Blog"

My SysAd Blog

My SysAd Blog
My UNIX-based blog covers a collection of tips for installations, programming, scripting, configuration, SQL, maintenance, troubleshooting, and command line syntax. What exactly is UNIX? Unix stands for UNiplexed Information and Computing System--ori
Articles: 1, 2, 3, 4, 5, 6, 7

Articles

User Unable to POP Incoming Mail via MS Outlook
2008-01-05 14:30:00
Yesterday I received a phone call regarding a user having problems with his mail. The user was able to send email but unable to receive it via MS Outlook Client. Usually, I encounter mail related problems due to recent password changes. However, that wasn?t the case this time because the user was able to connect to the POP server and subsequently send mail. Then I asked whether the ownership of the user's mailbox was set incorrectly or not. It was incorrect.Here is an example.# cd /var/mail# chown esoft:mail esoft# ls -l /var/mail/esoft-rw------- 1 esoft mail 110240 Jan 5 22:38 esoft
More About: Mail , User
User Unable to POP Incoming Mail via MS Outlook
2008-01-05 14:30:00
Yesterday I received a phone call regarding a user having problems with his mail. The user was able to send email but unable to receive it via MS Outlook Client. Usually, I encounter mail related problems due to recent password changes. However, that wasn?t the case this time because the user was able to connect to the POP server and subsequently send mail. Then I asked whether the ownership of the user's mailbox was set incorrectly or not. It was incorrect.Here is an example.# cd /var/mail# chown esoft:mail esoft# ls -l /var/mail/esoft-rw------- 1 esoft mail 110240 Jan 5 22:38 esoft
More About: Mail , User
FTP Using a Shell Script
2008-01-04 14:13:00
Manually transferring a file or files via FTP is a common and convenient method for moving data from one computer to another, especially if it?s a non-recurring event. But the reality is there are many times when an event is recurring and calls for immediate automation. This can be done by using a simple UNIX script file, which can then be executed via command line interface or added to the crontab. In the example below, I'm FTP?ing binary type files (pictures) from a local computer to a remote while logging the activity.Note: Some organizational policies may not allow login/password information in a script file.# vi myftp.sh#! /bin/shREMOTE='esoft'USER='anyuser'PASSWO RD='myftp125?FTPLOG=?/tmp/ftplog?date >> $FTPLOGftp -n $REMOTE _FTP>>$FTPLOGquote USER $USERquote PASS $PASSWORDbincd /myraid/dailyjpgsmput *.jpgquit_FTP:wq!Run via CLI# ./myftp.shAdd it to the crontab# crontab -e
More About: Script , Shell
MIT's OpenCourseWare Model is Proliferating Online
2007-12-30 13:36:00
The Massachusetts Institute of Technology OpenCourseWare effort has been offering free lecture notes, exams, and other resources from more than 1800 courses per its website. Some of their courses offer a substantial amount of video and audio content. I remember stumbling across this resource via my employer's intranet about a year ago. I thought it would not go very far because you couldn?t earn credit? Well, I was wrong. It?s catching fire and over 100 universities worldwide have setup similar models and some are top tier schools such as John Hopkins and Tufts. I was searching for a good UNIX course but I didn't find one yet. Surprisingly, it appears MIT?s Linear Algebra course is quite popular with the OpenCourseWare community.
More About: Model , Online
Shutdown a Sybase Adaptive and Backup Server
2007-12-28 16:08:00
Lately, I have seen a number of searches related to terminating an Sybase Adaptive server process. I wrote a post for starting a Sybase DBMS in July but not vice versa.Typically, the DBMS is started and terminated by using common startup and kill scripts. But SysAdmins can also gracefully shut down both the dataserver and backup servers via the command line. Here is a run.# isql ?Usa ?Ppassword1> shutdown SYB_BACKUP2> go1> shutdown2> goIf you can not shutdown the dataserver by the aforementioned methods, you might have to employ brute force: the kill -9 command. But note, this should only be performed in an emergency.# ps ?ef | grep backupserver# kill -9 PID# ps ?ef | grep dataserver# kill -9 PID
More About: Backup , Server , Shutdown
Assign Unique Numbers to Columns in Database - Oracle
2007-12-25 12:06:00
The other day I had someone ask me how to automatically assign unique numbers to a column in an Oracle database. I took an Oracle SQL class a few years ago and I remember learning about the ?create sequence? command. After reviewing a couple archived homework assignments for syntax, here are three typical examples of its use.create sequence myblog_ID increment by 1 start with 100;insert into MYBLOG (Blog, Author, ID) values (?My SysAd Blog?,?esofthub?,myblog_ID.Nextval);creat e sequence topblog_ID increment by 1 start with 1000;insert into TOPBLOG (Blog, Author, ID) values (?TopBlogLists?,?esofthub?,topblog_ID.Nex tval);create sequence mysysad_ID increment by 1 start with 10000;insert into MYSYSAD (Blog, Author, ID) values (?My SysAd Blog?,?esofthub?,mysysad_ID.Nextval);
More About: Database , Columns , Numbers , Unique
Search String Within Paragraph and Print the Paragraph - UNIX
2007-12-22 15:26:00
Here is another guest post by Mary M. Chaddock. She is a Network Security Administrator for a major university in Texas. Here is her time saving tip. Thanks Mary.This little routine searches a file for a string and then prints the paragraph associated with that string.Note: The Blogger application parsed out the greater-than and less-than characters so an underscore was used to preserve the contiguous nature of the symbols.Mary says?Grep'ing from a file with more than one line per record:You can do this with a Perl one-liner command: 'perl -00 -ne 'print if /'_gstring>'/' _filename>'But I can rarely remember the Perl syntax, so I put this small shell script in my $HOME/bin directory:#!/bin/sh## grep a string in a paragraph and print the paragraph.# A paragraph is delimited by a blank line.## syntax: gparagraph _string> _filename>#gstring=$1gfile=$2perl -00 -ne 'print if /'$gstring'/' $gfile
More About: Unix , Search , Print , String
Merge Multiple Files and Sort Simultaneously
2007-12-21 11:25:00
The other day I was gathering historical files populated with multiple logins. I was trying to determine how many user logins were created over the past three years. Obtaining a unique login count would involve simultaneously merging the files and then sorting.The actual run was much larger than the example run below.# lsuser1.txt user2.txt user3.txt user4.txt group1.txt group2.txt# more user[1-4].txt::::::::::::::user1.txt::::: :::::::::user1user2user3tommikeunixsysad: :::::::::::::user2.txt::::::::::::::ottbi rduser1mikesysadpauluser2user3bob:::::::: ::::::user3.txt::::::::::::::mikeunixblog gerrickseniorchopperpauliemikeytomvinceco dy::::::::::::::user4.txt::::::::::::::vi ncemikeypaulieseniorcody# wc -l user[1-4].txt 7 user1.txt 9 user2.txt11 user3.txt 5 user4.txt32 totalHere is the merged, sorted and unique output# sort user[1-4].txt | uniqThere are 19 unique logins for this example# sort user[1-4].txt | uniq | wc -l19
More About: Files , Sort , Merge , Multan , Ulta
Java Programming Language Tutorial
2007-12-14 16:44:00
Nowadays, I am more interested in PHP and mySQL because of activities related to my websites, so it has been awhile since I dabbled with the Java programming language.So why the concern?Lately, I have been thinking about writing a small Java utility for a personal project of mine. But I definitely needed a quick refresher. I found a reliable Java tutorial that covers the fundamentals of programming in the Java programming language. Here are the topics covered: object-oriented programming concepts, language basics, classes and object, interface and inheritance, numbers and strings, generics and packages.I will, undoubtedly, have to look over my old programs, too.
More About: Programming , Tutorial , Language , Programming Language
The Irony of a UNIX System Administrator
2007-12-09 14:54:00
A colleague of mine emailed me this funny animated gif about a frustrated user. I thought it was comical from my own user experiences, especially prior to my UNIX system administration days. I hated going through the troubleshooting part, particularly when the SysAd showed up to resolve my issue after it had ?magically? resolved itself. I remember the ?all knowing? system administrator explaining away the issue or looking at me as if I had ?timing and head space? issues. Frankly speaking, I find some irony in this rumination? ;)
More About: System , Unix , Irony , Administrator
Convert Length, Weight, Pressure, Volume and Temperature
2007-12-08 13:30:00
Here is a fairly comprehensive calculator by World Wide Metric that converts length, weight, pressure, volume, and temperature. Living in South Korea, I?m always converting some metric unit, especially Celsius to Fahrenheit. Length: meter, kilometers, feet, yards, millimeters, centimeters, miles, and inches.Weight : metric tons, kilograms, pounds, ounces, grams, and tonsPressure: bar, kg/cm, and psiVolume : milliliters, liters, fluid ounces, pints, cups, quarts, and gallonsTemperature : Celsius and Fahrenheit
More About: Convert , Vert
HTTP Response Status Code List
2007-12-05 11:54:00
The other day I was creating a sitemap for one of my websites. Unfortunately, I had a number of errors reported with several of my pages. I was trying to make sense of the error status codes but didn't have a handy reference readily available. Here's a compiled listing of common HTTP status codes.Common HTTP status codes and standard phrases:100 - Continue200 - OK - No error or successful response301 - Permanent Redirect302 - Redirect400 - Bad request401 - Unauthorized or this page requires authentication402 - Payment Required - Not used403 - Forbidden404 - Page not found405 - Method Not Allowed406 - Not Acceptable407 - Proxy Authentication Required408 - Request Timeout409 - Conflict410 - Gone411 - Length Required412 - Precondition Failed413 - Request Entity Too Large414 - Request-URI Too Long415 - Unsupported Media Type416 - Requested Range Not Satisfiable417 - Expectation Failed500 - Internal Server error501 - Not Implemented502 - Bad Gateway503 - Service Unavailable504 - Gatewa...
More About: Code , List , Status , Http , Response
The Great Wall Visit and UNIX wall
2007-11-27 15:29:00
I'm using the wall command for this post but only to stay within the format of this blog (Use of command and then show its output). And it is also being used as a pun to boot.# wallI just returned to South Korea from Beijing, China. It was a relaxing 5 days but also a bit cold and foggy for my liking.The group tour package venues exceeded my expectations. We visited the Heavenly Palace, Lama Temple, Tiananmen Square, The Forbidden City, Summer Palace, Silk Factory, Hutong, Hard Rock Cafe, Jade Factory, and Pearl Factory, a couple markets (not my idea :)) and the Great Wall . The Great Wall is an amazing feature and was by far the best venue. I traversed its highest tower carrying a 20+lb backpack. Unfortunately, my quads and hams were really sore for a couple days afterwards.The 2008 Olympics will be held in Beijing and everything seemed to be under construction. It?s amazing how much time, money, and effort goes into preparing for these games. The Chinese are hoping for post Olymp...
More About: Unix , Visit
Determine the Number of Login/Logout Sessions - UNIX
2007-11-21 11:25:00
Here is an easy way to determine how many login/logout sessions were recorded for a particular workstation. I will employ a few common UNIX system administration commands to fetch, filter, and then count the information derived from the wtmpx file. And by the way, my wtmpx file has not been cleared out in awhile.# csh# last | grep esoft | wc -l 24In some organizations, logging in as the root user via the console is restricted. Check to see if anyone has logged in as root via the console.# last | grep console | grep root | wc -l 20Recorded Reboots# last | awk '{print $1}? | grep reboot | wc -l 36Number of logins for each users/pseudo users (/bin/ later added per ux-admin's suggestion)# foreach i (`last | awk '{print $1}' | sort | uniq | grep -v wtmp`)? /bin/echo $i `last | grep $i | wc -l`? endftp 16reboot 36restrict 1root 167esoft 24Total logins for users/pseudo users# last | awk '{print $1}' | grep '.' | grep -v wtmp | wc -l 244
More About: Unix , Sessions , Logi
List, Remove or Rename Multi-spaced Filenames - UNIX
2007-11-16 15:36:00
I know this is a common HOWTO for UNIX system administrators, but I do get this question on occasion. The question is the following: "how do you delete a file with spaces in its name?" Use quotes, "".From experience, I have seen numerous people type in file name at the CLI, and then they are prompted with the predictable ?No such file or directory? error message. Here are some ubiquitous examples for dealing with spaces in filenames.Using no quotes, 3 separate files are created# csh# touch test file 1# ls -ltotal 0-rw-r--r-- 1 root other 0 Nov 16 23:17 1-rw-r--r-- 1 root other 0 Nov 16 23:17 file-rw-r--r-- 1 root other 0 Nov 16 23:17 testUsing quotes, 5 files are created with spaces as part of their unique filenames# touch "test file 1"# touch "test file 2"# touch "test file 3"# touch "test file 4"# touch "test file 5"# lstest file 1 test file 2 test file 3 test file 4 test file 5Attempt to list a specific multi-spaced filename without quotes# ls test file 1test: No such file or dir...
More About: Unix , Multi , List , Rename
Log Repeated Login Failures
2007-11-15 18:30:00
You can log repeated login failures with the /var/adm/loginlog file. This file is not created by default, so you will have to create it. Most systems will allow 5 login retries before logging the event to this file. By the way, you can modify the max retries variable in the /etc/default/login file.# cd /var/adm# touch loginlog; chmod 700 loginlog; chown root:sys loginlog# ls -l loginlog-rwx------ 1 root sys 0 Nov 16 02:33 loginlogAttempt to loginlogin: user1Password:Logi n incorrectlogin: user1Password:Login incorrectlogin: user1Password:Login incorrectlogin: user1Password:Login incorrectlogin: user1Password:Login incorrectConnection to host lost.###################Now view the contents of the /var/adm/loginlog file.# cd /var/adm# more loginloguser1:/dev/pts/2:Fri Nov 16 02:37:01 2007user1:/dev/pts/2:Fri Nov 16 02:37:09 2007user1:/dev/pts/2:Fri Nov 16 02:37:16 2007user1:/dev/pts/2:Fri Nov 16 02:37:23 2007user1:/dev/pts/2:Fri Nov 16 02:37:31 2007
Sort a File by a Defined Delimiter
2007-11-14 17:04:00
I was sorting out a few colon delimited files tonight. I though the task might be post worthy. The two examples below are colon, ":", delimited and pipe, "|", delimited. Obviously, you can define other types of delimiters such as "," , ";" , "#", and etc.# vi sortmephoenix:az:mountainlos angeles:ca:pacificaugusta:me:easternhoust on:tx:centraldallas:tx:centralberkeley:ca :pacificseattle:wa:pacificdenver:co:mount ainsanta fe:nm:mountain:wq!Sort by TZ# sort -t: +2 sortmedallas:tx:centralhouston:tx:central augusta:me:easterndenver:co:mountainphoen ix:az:mountainsanta fe:nm:mountainberkeley:ca:pacificlos angeles:ca:pacificseattle:wa:pacificSort by state# sort -t":" +1 sortmephoenix:az:mountainberkeley:ca:paci ficlos angeles:ca:pacificdenver:co:mountainaugus ta:me:easternsanta fe:nm:mountaindallas:tx:centralhouston:tx :centralseattle:wa:pacificSort by city# sort -t":" sortmeaugusta:me:easternberkeley:ca:pacif icdallas:tx:centraldenver:co:mountainhous ton:tx:centrallos angeles:ca:pacificphoenix:az:...
More About: File , Defined , Define , Limiter
Strip an Extension From a Filename - UNIX
2007-11-10 11:57:00
I received this common question the other day. "How do I strip an extension from filenames using sed?" Frankly speaking, I thought this howto was already posted in this blog, but after further review, it doesn't appear to be. At any rate, here are some examples starting out with sed. I'm sure others have better ways of performing this task.Using the sed command to strip an extension# csh# lst1.dat t2.dat t3.dat t4.dat t5.dat# foreach filename (*.dat)? mv $filename `echo $filename | sed 's/.dat//g'`? end# lst1 t2 t3 t4 t5Using the basename command to strip an extension# lst1.dat t2.dat t3.dat t4.dat t5.dat# foreach filename (*.dat)? mv $filename `basename $filename .dat`? end# lst1 t2 t3 t4 t5Using the echo command to strip an extension# lst1.dat t2.dat t3.dat t4.dat t5.dat t6.d1t# foreach filename (*.dat)? mv $filename `echo $filename:r`? end# lst1 t2 t3 t4 t5 t6.d1tAnother example using the echo comm...
More About: Unix , Extension , Strip
Remove First 10 or 100 or 1000 Lines in a Log File - UNIX
2007-11-07 16:10:00
After reviewing my Google Webmaster tools, I've observed several search iterations for "remove first 100 or 1000 lines in a log file." Here's an example to demonstrate removing the first 10 lines, 100 lines or 1000 lines in an .htaccess file.Remove first 10 lines# nl -ba .htaccess | more 1 2 order allow,deny 3 allow from all 4 5 6 deny from 213.xxx.xxx.xx 7 deny from 124.xxx.xxx.xx 8 deny from 81.xxx.xxx.xx 9 deny from 88.xxx.xxx.xx 10 deny from 88.xxx.xxx.11 11 deny from 84.xxx.xxx.56 12 deny from 88.xxx.xxx.xx 13 deny from 82.xxx.xxx.xx 14 deny from 69.xxx.xxx.xx 15 deny from 24.xxx.xxx.xx ...# tail +11 .htaccess | moredeny from 84.xxx.xxx.56deny from 88.xxx.xxx.xxdeny from 82.xxx.xxx.xxdeny from 69.xxx.xxx.xxdeny from 24.xxx.xxx.xx...Above is for illustration purposes but this syntax is all you need.# tail +11 .htaccess > remove_10Lines .txtRemove first 100 lines# nl -ba .htaccess | more ... 96 deny from 85.xxx.xxx.xx 97 deny from 85....
More About: Unix , File
Add User Information with .project and .plan files
2007-11-06 14:51:00
The .plan file was intended to advise users, who can use the finger command, where someone was located or planning to do in the near-term. It's a user created free form file, so you can pretty much add what you want -- maybe signature type (phone number, address, website, blog, interests, etc) information. In this example, I'm listing phone numbers for after hours support followed by a quote.Note: The fingerd daemon may be disabled at your site per security policies.The finger command will read the first line of the .project file.# vi .projectAFTER HOURS SUPPORT:wq!Just add your free form information in the .plan file# vi .planFor after hours support, call xxx-xxxx.-----"If you get the dirty end of the stick, sharpen it and turn it into a useful tool" -- Colin Powell:wq!# finger -l esoftLogin name: esoftDirectory: /export/home/esoft Shell: /bin/cshLast login Wed Oct 31 23:57 on pts/3 from wkstn2No unread mailProject : AFTER HOURS SUPPORTPlan :For after hours support, ca...
More About: Information , User , Files
Are Blogspot blogs being blocked in South Korea?
2007-11-01 17:48:00
A number of folks living in South Korea are complaining their *.blogspot blogs are inaccessible. I'm one of them.I can access the blogger.com homepage and obviously my control panel, but I can't view the blog unless I go proxy.I did a trace route a few times and it does appear to be stopping in Asia.C:Documents and Settingsesoft>tracert esofthub.blogspot.comTracing route to blogspot.l.google.comover a maximum of 30 hops:It was dying after 7 hops...TraceRoute to 59.18.xx.xxBlogger Help GroupUpdate @1903 KST Nov 2: After several hours of dialog with Korean Telecoms customer service and their technicians, I'm finally able to access *.blogspot URLs. I talked to one of their English speaking representatives and he said the issue is being worked.
More About: South Korea , Blogs , Blogspot
Evaluate Constants and Strings with expr Command
2007-10-31 16:23:00
The expr command is a handy utility for evaluating constants and strings via the command line interface. Here are a few examples of expressions.# expr 9 * 981# expr 9 / 91# expr 9 + 918# expr 9 - 90# expr 9 % 90# expr 50 - 100-50# expr 6 + 8 * 978# expr 9 * ( 2 + 6 )72Evaluate relational operators: true (1) or false (0)# expr esoft 1# expr esoft > topbloglists0# expr esoft == topbloglists0# expr esoft != topbloglists1# expr 8 1# expr 8 > 90# expr 8 != 91# expr 8 1
More About: Strings , Command , Tring
Remove the PHPSESSID From URL
2007-10-29 13:20:00
The last couple of days I have been trying to remove unsightly PHPSESSIDs from my URLs. Here's how one looked on google.com.http://www.xxxxxx.com/details_ xxxxxx__xxxxxxxxxxxxxx-.html?PHPSESSID=97 6fc83764c21749f95e831xxx6a3bxxI opened up the php.ini file in Notepad and changed the 1 to 0. I'll check later on to see if it worked.session.use_trans_sid = 0-----You can also put this in your config fileini_set('session.use_trans_sid', false);You can also modify the .htaccess file but a lot of web hosts won't let you do this type of modification. I tried.php_flag session.use_trans_sid off
Get Better Compression with bzip2 Command - UNIX
2007-10-28 15:32:00
I was trying out the bzip2 compression command. I did notice better compression rates with larger files (testing large tarballs) compared to gzip or compress. But it does take quite a bit of time to perform the compression. Here's one run I did.# ls -l mytest20.tar-rw-r--r-- 1 root other 50747392 Oct 28 23:58 mytest20.tar# gzip mytest20.tar# ls -l mytest20.tar.gz-rw-r--r-- 1 root other 9763163 Oct 28 23:58 mytest20.tar.gz# gunzip mytest20.tar.gz# bzip2 mytest20.tar# ls -l mytest20.tar.bz2-rw-r--r-- 1 root other 5757170 Oct 28 23:58 mytest20.tar.bz2To uncompress use bunzip2 or bzip2 -d# bunzip2 mytest20.tar.bz2# ls -l mytest20.tar-rw-r--r-- 1 root other 50747392 Oct 28 23:58 mytest20.tar
More About: Compression , Unix , Command , Compress
Display MAC, IP and DNS information for Windows
2007-10-22 13:05:00
I've had few questions about obtaining the MAC and IP addresses on a Windows box. Personally, I find the ipconfig command as the easiest way to get this information. Here's an example.C:Documents and Settingsesofthub>ipconfig /allWindows IP Configuration Host Name . . . . . . . . . . . . : ixxx Primary Dns Suffix . . . . . . . : Node Type . . . . . . . . . . . . : Mixed IP Routing Enabled. . . . . . . . : Yes WINS Proxy Enabled. . . . . . . . : NoEthernet adapter Local Area Connection: Connection-specific DNS Suffix . : Description . . . . . . . . . . . : Intel(R) PRO/1000 CT Network Connection Physical Address. . . . . . . . . : xx-xx-xx-xx-xx-xx Dhcp Enabled. . . . . . . . . . . : Yes Autoconfiguration Enabled . . . . : Yes IP Address. . . . . . . . . . . . : xxx.xxx.x.x Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : xxx.xxx.xx.x DHCP Server . . . . . . . . . . . : xx...
More About: Information , Display
Modify a Command's Scheduling Priority with nice
2007-10-18 15:39:00
There may be times when you need to modify the priority of a command (process). You can do this by using the nice command. It modifies the scheduling priority of the command . 19 is the lowest priority, 1 is the highest priority, and 10 is the default. Here are a few examples.Highest priority# nice -n 1 myfindLowest priority# nice -n 19 myfindDefault priority is 10# nice myfind
More About: Nice , Modify , Modi , Priority
Check Sent Mail Status with mailq
2007-10-17 16:05:00
I had a number of users informed me that their messages were "stuck in the queue or something hanging." Their concerns were confirmed after using the mailq command. After a brief investigation, it was discovered was a small hiccup with DNS.Here's an example of the mailq output.# mailqor# mailq -v /var/spool/mqueue (19 requests)----Q-ID---- --Size-- -Priority- ---Q-Time--- ---------Sender/Recipient--------l9HDvk50 0367 5 120046 Oct 17 22:57 user1 user2l9GGhCW02706 1333 7770119 Oct 17 01:43 user3 user1l9GGhCX02706 1363 7770119 Oct 17 01:43 user4 user5...
More About: Mail , Check , Status
Recovering a Corrupted Mailbox -- UNIX
2007-10-16 14:13:00
The other day I had user who was having problems popping mail from the mail server. My first thoughts were wrong password, POP server issue or permissions. Well, it was none of the above. Then I started thinking about the mailbox itself. Here's what I found.Btw, this example is not the original user's mailbox but it should demonstrate the problem.Notice there are three lines that don't make much sense.# cd /var/mail# more user1$^$RM?T5,1@$" 0JP @ZLFrom user2 Fri Jun 29 22:51:34 2007Return-Path: Received: (from user2@localhost) by esoft (8.11.6+Sun/8.11.6) id l5TDpYJ01536 for root; Fri, 29 Jun 2007 22:51:34 +0900 (KST)Date: Fri, 29 Jun 2007 22:51:34 +0900 (KST)From: Super-User Message-Id: ......I deleted those 3 lines and re-saved the mailbox. After that, he was able to pull his mail successfully.# more user1From user2 Fri Jun 29 22:51:34 2007Return-Path: Received: (from user2@localhost) by esoft (8.11.6+Sun/8.11.6) id l5TDpYJ01536 for root; Fri, 29 J...
More About: Unix , Erin
The Popular XV Image Viewer for UNIX
2007-10-12 20:00:00
Yesterday, I received an email asking me about a versatile jpeg image viewer for UNIX. My initial thoughts were to use the common browser or the image related utilities in /usr/openwin/bin -- imagetool or snapshot.Then I started thinking about XV. XV is a popular image viewing shareware program. I have found it to be very effective at resizing screenshots, cropping, expanding, and converting images to different image formats. Personally, I've been using XV (3.10 and now 3.10a) for a number of years without complaint.I installed xv in my /opt/apps directory.# /opt/apps/xv &
More About: Unix , Popular , Image , Viewer , Image Viewer
Display a Specified Number of Lines From Multiple Files
2007-10-11 14:43:00
Here's an ad-hoc way of viewing a specified number of lines that begins with line one. In this example, the templated report has 8 lines and only its values change each day.I only want to show the first 5 lines for each file. Here's a quick and dirty way of doing that.In this template file (Mon), the values are only shown for illustration purposes .# cat MonAverage Stats: 100Hourly Stats: 4Daily Stats: 103Weekly Stats: 700Monthly Stats: 2812###############END END###############Display 5 different files and show their first 5 lines# head -5 Mon Tue Wed Thu Fri==> Mon Average Stats: 100Hourly Stats: 4Daily Stats: 103Weekly Stats: 700Monthly Stats: 2812 ==> Tue Average Stats: 102Hourly Stats: 4Daily Stats: 104Weekly Stats: 706Monthly Stats: 2822 ==> Wed Average Stats: 104Hourly Stats: 5Daily Stats: 110Weekly Stats: 730Monthly Stats: 2842 ==> Thu Average Stats: 90Hourly Stats: 200Daily Stats: 2400Weekly Stats: 4499Monthly Stats: 3006 ==> Fri Average Stats: 101Hourly Stats: 3Daily ...
More About: Files , Lines , Number
More articles from this author:
1, 2, 3, 4, 5, 6, 7
40883 blogs in the directory.
Statistics resets every week.


Contact | About
© Blog Toplist 2008 - SEO by FeWorks
eXTReMe Tracker