how to pin files to /tmp


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting how to pin files to /tmp
# 8  
Old 03-29-2008
Can you wrap the cp so you see whether it's happening?

Code:
if ! test -e /.cdrom/<somehting.zlib>; then
  echo something.zlib is not there, ouch >&2
elif ! test -w /tmp
  echo /tmp is not writable, ouch >&2
elif cp /.cdrom/<something.zlib> /tmp; then
  : .. proceed as normal
else
  echo ouch, cp failed: $? >&2
fi

Also still suggest you try with cat or gzcat as a possible workaround. Did you try that?
# 9  
Old 03-29-2008
Oh yeah, also the command; if test $? -eq 0; then ... is an abomination. The idiomatic way to do that is if command; then ...
# 10  
Old 03-29-2008
yes i have tried that as well..
I will give your script a shot and let you know by the night

Hope it works
Thanks
# 11  
Old 03-29-2008
There seems to be something wrong with the script ...
when i tried to incorporate the changes and then boot it, there was a file error that was reported..

what do you think could be wrong?
I'll rechek for any sytax errors but i dont think i have made any..
# 12  
Old 03-29-2008
Pretty please, don't leave us guessing. Post the actual error message.
# 13  
Old 03-29-2008
oh that would be difficult , am out for a seminar and i dont have a laptop to boot it and write down the error...
all systems here are thin clients
anyway i will do so as soon as i get back
# 14  
Old 03-29-2008
Hey i think i've solved the problem,

Since the am trying to cp a file that is abut 650mb to tmp at the time of boot, perhaps the memory bits are not yet arranged properly and since its still in fragments(in the early stages of boot),i guess such a large file cannot be cp to tmp.

The error i got from your script cannot be written since it runs into lots of lines and i'll have to write it down first then transfer(no camera)..

Anyway, if you have any idea what i can do now to pin this file to /tmp pls suggest,...

Awaiting your reply
wrapster!!
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Can all files under /tmp be safely removed

I wanted to know whether all files under /tmp can be safely removed. I guess that /tmp may also have temporary files for applications currently being worked on, so at the most those applications may just shut down. I hope that my question is clear whether all files under /tmp can be safely... (5 Replies)
Discussion started by: RHCE
5 Replies

2. UNIX for Dummies Questions & Answers

Redirecting tmp files of SORT into different directory

Hey Guys, I am facing an annoying scenario, fewer times when I execute the sort command, it throws out on error saying that "No Space on available on /var/tmp/<temp file name>. May be it is set to /var/tmp directory. I was wondering, if I cant redirect the temporary file creation to any other... (3 Replies)
Discussion started by: abhisheksunkari
3 Replies

3. AIX

Unknown files in /tmp

I have a lot of files with the following names in /etc /tmp/<num>.mktcpip like /tmp/934030.mktcpip Anyone knows which process creates these files? (1 Reply)
Discussion started by: petervg
1 Replies

4. UNIX for Dummies Questions & Answers

ls or find files under /tmp/*

what is proper syntax to ls all files under /tmp/*, and wc -c ? (4 Replies)
Discussion started by: tjmannonline
4 Replies

5. AIX

what is creating the files in /tmp

How do I find what is creating these bunch of zero byte files under /tmp directory every few minutes. AIX - 5.3 TL05 # ls -l /tmp -rw-r--r-- 1 root system 0 Nov 05 16:54 n83n7a -rw-r--r-- 1 root system 0 Nov 05 16:54 ZO3S7a -rw-r--r-- 1 root system ... (3 Replies)
Discussion started by: mbak
3 Replies

6. Solaris

How to save files in /tmp????

Hi all, I would like to know how to save files in /tmp... I was interested in knowing this because when ever i booted into solaris there would already be a few files present in /tmp.however any file that is freshly stored in would be lost on reboot... can anyone answer this pls!! (3 Replies)
Discussion started by: wrapster
3 Replies

7. AIX

set permission to files in /tmp

Trying to setup user to have the ability to delete any files (regardless of owner) in /tmp. I've tried almost everything... the permission on the folder is drwxrwxrwt 10 bin bin, and at one point I give all the possible permission (short of root) I can give to the user, and he still can't delete... (2 Replies)
Discussion started by: cchiang12
2 Replies

8. Solaris

Auto delete files in /tmp dir ???

I have a Solris 9 box my problem is when I restart my box all my files and dirs in /tmp dir will be deleted exept 2 directories I found them since installation phase !!!! How to keep my files at that dir " /tmp " even after restarting ??? (1 Reply)
Discussion started by: DarkSoul
1 Replies

9. Shell Programming and Scripting

K shell /tmp/sh$$.* files problem

Hi, I am encountring this problem from some time now... ksh creates temp files /tmp/sh$$.* . Sometimes if some of my shell script crashes or I kill it... these temp files remain in the /tmp directory. At some later time when some script gets the same PID it tries to create files in the... (5 Replies)
Discussion started by: amitkr
5 Replies

10. UNIX for Dummies Questions & Answers

monitoring /tmp and /var/tmp for suspicous activity

Hello, does anyone have a script that can check the contents of the /tmp directory and for example e-mail the directory content if anything other than session files are present? Maybe there are better ways to monitor suspicous /tmp and /var/tmp activity, if so I'm listening :) (1 Reply)
Discussion started by: jamesbond
1 Replies
Login or Register to Ask a Question