01-23-2011
Quote:
Originally Posted by
subhasri_2020
HI,
I didn't get the .tmp thing, when the source files are in copying state in the source directory they are not having any .tmp extension , this process will be required for a datamigration application so after the file is copied in the source directory with in 30 mins it has to be loaded in the table so copying the source files to temp location will delay that process.
The original proposal was to give the file a different name when it is being copied and then move to the final name once done. eg:
mv /my/migration/dir/Monday_0124.txt.tmp /my/migration/dir/Monday_0124.txt
The mv command should operate pretty much
instantaneously when the source and destination filenames are within the same filesystem, as this only involves an update of the File table, not a physical move (or copy) of the bytes within the file.
9 More Discussions You Might Find Interesting
1. Cybersecurity
Hey,
I currently have a set of captured sessions thru ethereal, saved in pflog files, basically its a tcpdump, which i need to go thru and sort the applications/protocols in order of the times they were used. I also need to change the headers of the packets, basically the source and destination... (0 Replies)
Discussion started by: PenguinDevil
0 Replies
2. UNIX for Dummies Questions & Answers
I need to run a 4ge from within my shell script and capture the string value that is being returned into a unix variable. I have tried the back ticks to no avail. I know it is returning because I did get the returned value to go to my screen at one point..
What I have is:
sendlist =... (3 Replies)
Discussion started by: jeniferz
3 Replies
3. Filesystems, Disks and Memory
Hi, Im trying to take a database backup. one of the files is 26 GB. I am using cp -pr to create a backup copy of the database. after the copying is complete, if i do du -hrs on the folders i saw a difference of 2GB.
The weird fact is that the BACKUP folder was 2 GB more than the original one!
... (1 Reply)
Discussion started by: 0ktalmagik
1 Replies
4. Shell Programming and Scripting
Hi all,
We have a script in our Unix box(HP-UX 11.11) which is invoked as
script1.sh param1 param2 >>${logfile} script2.sh "param"
Actually the script2 is also called from the same line. There is no semicolon between the 2 calls. I also checked the octal dump. What happens here... (2 Replies)
Discussion started by: ranj@chn
2 Replies
5. Shell Programming and Scripting
We have 2 file XML files - FILE1.XML and FILE2.xml - we need copy the contents of FILE1.XML and replace in FILE2.xml pattern "<assignedAttributeList></assignedAttributeList>"
FILE1.XML
1. <itemList>
2. <item type="Manufactured">
3. <resourceCode>431048</resourceCode>
4. ... (0 Replies)
Discussion started by: balrajg
0 Replies
6. Shell Programming and Scripting
I'm tring to write down a simple script that would execute a command and wait until it returns a specific result.
This is what i did:
bjobs_out=`bjobs`
while ]; do
bjobs_out=`bjobs`
sleep 6
done
It seems to work until the command 'jobs' return the list of jobs in execution, but... (4 Replies)
Discussion started by: lifedj
4 Replies
7. UNIX for Dummies Questions & Answers
Hi guys, I am a newbie here :wall:
I need a script that can search for a file in a directory and copy the contents of that file in a new file.
Please help me. :confused: Thanks in advance~ (6 Replies)
Discussion started by: zel2zel
6 Replies
8. Shell Programming and Scripting
I want a script that would do as:-
a) gives me packet capture account for each time it runs.
b) be able to run at a particular time for specific period time duration (1 min).
c) for each time it runs it saves the time / day.
Is there a way where i can capture the details as seen in the... (2 Replies)
Discussion started by: lazerz
2 Replies
9. Shell Programming and Scripting
Hello,
I have a file called COMPLIST as follows that contains 4 digit numbers.0002
0003
0010
0013
0015
0016
0022
0023
0024
0025
0027
0030
0031
0032
0033
0035
0038
0041 (3 Replies)
Discussion started by: sph90457
3 Replies
LEARN ABOUT LINUX
dh_movefiles
DH_MOVEFILES(1) Debhelper DH_MOVEFILES(1)
NAME
dh_movefiles - move files out of debian/tmp into subpackages
SYNOPSIS
dh_movefiles [debhelperoptions] [--sourcedir=dir] [-Xitem] file...]
DESCRIPTION
dh_movefiles is a debhelper program that is responsible for moving files out of debian/tmp or some other directory and into other package
build directories. This may be useful if your package has a Makefile that installs everything into debian/tmp, and you need to break that
up into subpackages.
Note: dh_install is a much better program, and you are recommended to use it instead of dh_movefiles.
FILES
debian/package.files
Lists the files to be moved into a package, separated by whitespace. The filenames listed should be relative to debian/tmp/. You can
also list directory names, and the whole directory will be moved.
OPTIONS
--sourcedir=dir
Instead of moving files out of debian/tmp (the default), this option makes it move files out of some other directory. Since the entire
contents of the sourcedir is moved, specifying something like --sourcedir=/ is very unsafe, so to prevent mistakes, the sourcedir must
be a relative filename; it cannot begin with a `/'.
-Xitem, --exclude=item
Exclude files that contain item anywhere in their filename from being installed.
file ...
Lists files to move. The filenames listed should be relative to debian/tmp/. You can also list directory names, and the whole directory
will be moved. It is an error to list files here unless you use -p, -i, or -a to tell dh_movefiles which subpackage to put them in.
NOTES
Note that files are always moved out of debian/tmp by default (even if you have instructed debhelper to use a compatibility level higher
than one, which does not otherwise use debian/tmp for anything at all). The idea behind this is that the package that is being built can be
told to install into debian/tmp, and then files can be moved by dh_movefiles from that directory. Any files or directories that remain are
ignored, and get deleted by dh_clean later.
SEE ALSO
debhelper(7)
This program is a part of debhelper.
AUTHOR
Joey Hess <joeyh@debian.org>
8.9.0ubuntu2.1 2012-06-12 DH_MOVEFILES(1)