You can mv (rename, or relocate) an open file as long as the mv destination is on the same filesystem the file currently lives on.
So, try this, an assumption is you have a text file with a list of files to cp, also that there are no permissions errors, we assume the only error is 'open file':
I am almost a beginner. And a total idiot.
so i have
done a dd if=/somefile.img of=/dev/sdc1
sdc1 was a USB disk drive with many many files on it i did not want to lose.
What it did was remove the dev/scd1 USB drive and my mounting of /media/movie and then change it to /media/somefile... (2 Replies)
I want to avoid a situation where because two users simultaneously
open a file and modify and save, leaving the original file in mess.
Is there a way in UNIX to warn a user if that particular file is already being
used by another user.
Thanks in advance (3 Replies)
Hi All,
I have the below code where Iam connecting from xzur111pap server to xzur0211pap server thru ssh to execute some commands.
ssh xzur0211pap
spaceleft=`df -k /home |tail -1 | awk '{print $5}'`
spaceleft=${spaceleft%\%}
if ]; then
echo "ALERT : HUFS(/home $spaceleft)"
exit 0... (3 Replies)
Hi
#Testing for file existence
if ; then
echo 'SCHOOL data is available for processing'
else
echo 'SCHOOL DATA IS NOT AVAILABLE FOR PROCESSING'
:
i wrote a script, where it begins by checking if file exists or not.
If it exists, it truncates the database... (2 Replies)
I ran the following command.
cat abc.c > abc.c
I got message the following message from command cat:
cat: abc.c : input file is same as the output file
How the command came to know of the destination file name as the command is sending output to standard file. (3 Replies)
I have a Excel VBA script that automatically runs when opened, extracts one table from a Microsoft Access Database, saves it as CSV, closes it, extracts another, saves it as CSV, closes it, then terminates itself.
Is is called from a short .bat file using the /e option so that Excel does not... (1 Reply)
Hello Team,
Is there any Linux command / script available so that, I could create a simple 0 byte file in destination server by issuing the command from source server.
If yes, Could you please let me know the possible solutions.
in other words I just want to create a touch file in my home... (1 Reply)
I have a script on a Linux box which scp the files to windows server without any issues. but there are time frames where the windows server will not be available due to maintenance. hence I need to check if the remote location is available before running the scp command.
scp... (3 Replies)