Category: UNIX-Unix Beginner
how to set a path for a command?
hi,
i install java at fedora core. so to run any java applications i have to write the complety path. for example,
/usr/java/jre1.5.0_11/bin/java "javafile"
i want to write only "java" but it said "command not found".
how i fix this?
thank you very much
Read More...
Category: UNIX-Unix Beginner
pad zeros
hi can i know command to pad zeros to a value
code:
Read More...
Category: UNIX-Unix Beginner
create a calculated field from existing fields
i need to add an average field to a file. i can create it in an on-screen report and it does what i need using the awk command but i can't get it to create a new file with the additional field. here's what i'm working with:
file layout: id:lastname:firstname:grade1:grade2:grade3:grade4
i need the avg field added after grade 4.
the calculation i used in the awk statement to print the extra field was:
($4*.5+$5*.2+$6*.1+$7*.2)
i can't get this into a file though. any ideas would be greatly appreciated. thanks
Read More...
Category: UNIX-Unix Beginner
how to compare the difference between a file and a folder??
hi,
i have a .txt file which has to be compared with a folder and print the difference to some other .txt file.
i did try with the diff command..i mean
diff /tmp/aaa/bbb.txt /space/aaa/bbb/
/***bbb.txt contains all the files names which may or may not exist in the folder bbb..so i need to capture the files that does not in the folder***/
it gives me an error mesg saying..
diff : /space/aaa/bbb/ /bbb.txt : no such file or directory.
can you help me out with some other command?
thanks,
Read More...
Category: UNIX-Unix Beginner
gunzip question
unzip test.zip ==> this uncompresses and keeps the original zip file.
gunzip test.gz ==> removes the .gz file after uncompressing.
is there any switch to make the .gz file available after uncompression.
Read More...
Category: UNIX-Unix Beginner
mail
i am having a few problems using the mail command. i have a user account on a remote unix system that i access from my home system using ssh. when i am at home i open a terminal on this remote system via ssh and i then use the mail command to send email, this works. however when i execute the same command from a terminal on my home system, the email does not arrive in the recipients mailbox. the mail command seems to function ok on my system, but it does not seem to send mail. i know that a terminal on my home system has access to an internet connection as i execute ssh from it and this works. why is mail not sending emails from my system? do you have to somehow configure mail before you use it? the many online turorials for mail i have found mention only how to send and receive mail, none mention any configuration requirements for the mail program.
Read More...
Category: UNIX-Unix Beginner
batch id in unix
hi can any one help me?
how to find the "batchid" in unix?
regards,
ganapati.
Read More...
Category: UNIX-Unix Beginner
cron job every 2 min
hi guys!
i have problem with cron
2,4,6,8,10,12,14,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60 * * * * /usr/local/george/update.py
i try this to schedule the script to run every second min forever but it doesn't work
any idea?
thanks in advance
Read More...