Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

questions about some commands

Status
Not open for further replies.

minus0

Programmer
Feb 20, 2003
73
US
Hi all,

I have a few questions

How do i open a large file using the VI editor? When i try to open a large file, get an error message saying "tmp file is too large to open" - I could temporarily solve my problem by FTP'ing the file to my hard drive and open it but is there any other way of doing this?

If i wish to kick off a job say on the last day and last hour of every month how do i check the date?

I set up aliases in my profile for CD'ing to a particular directory - for ex when i do $me i am taken to my home directory but how do i exectute this command (me) from within a shell script?

Also, is there some website that would give me some tricks/tips regarding VI editor?

I am a novice in UNIX which is the reason for all these questions

thanks for your time
Nask
 
how large is this file, the OS you are using ? the shell ?
i never, never got the error
"tmp file is too large to open"
my be your (/tmp or) /var/tmp is too small, /bin/vi
normally uses /var/tmp
in this case: add swap
 
vi stuff covered by Iribach and Annihilannic

Assuming you have permission to use cron then use
'crontab -e' to edit your cron file and add
00 23
 
whoops .. vi stuff covered by Iribach and Annihilannic

Assuming you have permission to use cron then use
'crontab -e' to edit your cron file and add
00 23 * * * <script> >logfile 2>&1

where <script> starts

#!/usr/bin/ksh
[ ! `date +%d` -eq `cal | tr '\012' ' ' | awk '{ print $NF }'` ] && exit 0
....
.... rest of code here
....

i.e run at 23:00 every day. Script compares today with the last day in the current month and exits if it isn't.

JB


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top