Hi
I am new in unix and look for help in urgent.
I have a list of data files that located in a directory, and need to copy to another directory for loading. The condition here is, the list of data files has to be copy over by sequence, and if there is no file in targetted directory already.
... (4 Replies)
Hi All,
I am in the directory a/b/processed
the files in this directories are
-rw-r--r-- 1 owb users 330 Aug 8 chandantest.txt_08082008
-rw-r--r-- 1 owb users 220 Aug 7 chandantest.txt_07082008
-rw-r--r-- 1 owb users 330 Aug 6... (3 Replies)
Hi Team,
I wish to copy the latest file of pattern "MyFile*" to some other location.
I need to do all the operation in a single command separated by |.
ls -rt <MyFile*> | tail -1 | <copy command>.
How can I do?
Please help me.
Thanks,
Kanda (2 Replies)
I'm looking to write a script that will check the contents of a directory, and if any files exist in that directory copy them to a temporary folder. The target files are only resident for a few seconds, so I think the script needs to be running constantly.
Any pointers would be really... (3 Replies)
Hi Everybody,
i want a samll help to write a script.
i had source location with :/user/bin (bin contains subdirectories with like names emails etc and had several files in each subdirectory)
and target location with :/usr/scripts (having same subdirectories names and had some files)... (1 Reply)
Hello all,
I've been researching this problem for days, and have gotten no luck . =/
How do you copy a file to another directory without being in the same directory as the file? So, for example, say I wanted to copy the file 'my.txt' that is in the directory ' /export/hom0/user/asdf ' to the... (9 Replies)
Hi,
I am looking for an answer for following senario:
I have a text file (base.txt) which consist list of files to be searched like:
base.txt
abc.txt
def.txt
fgh.txt
Now i am going to search all the listed files in another directory after reading them one by one, once i found the... (10 Replies)
Hello,
I've been spending a lot of hours trying to imitate cp copying a file to a directory.
cp
I just can't seem to write to a specified directory, it only creates a copy on the current directory.
any hints/tips will help! Thanks!
here's the code i've been trying to manipulate:
... (1 Reply)
I am trying to sort the following files from folder Bag to Apple, Cat Food, Dog Food. I can get all of the files I want into a new folder, but not sure of the best approch to get them to their final directory
My Files
==========
apple.1234.ext
apple.1235.ext
cat food 101.ext
Cat Food... (2 Replies)
Discussion started by: mtschroeder
2 Replies
LEARN ABOUT NETBSD
vndcompress
VNDCOMPRESS(1) BSD General Commands Manual VNDCOMPRESS(1)NAME
vndcompress, vnduncompress -- compress/uncompress file system images to/from cloop2 format
SYNOPSIS
vndcompress [-cd] disk/fs-image compressed-image [blocksize]
vnduncompress [-cd] compressed-image disk/fs-image
DESCRIPTION
The vndcompress program compresses an existing file system image into a cloop2 compatible compressed file system image. An optional block-
size can be given. If omitted, the default of 64kB is used.
The vnduncompress command decompress a cloop2-compressed file system image back into a regular image.
The file system images that can be handled are not limited to any specific file system, i.e. it is possible to handle images e.g. in ISO 9660
or UFS/FFS format. File system images in the cloop2 format are intended to be used with the vnd(4) driver in compressed mode as configured
by the -z option of the vnconfig(8) program, and later mounted with the appropriate -t option to mount(8).
OPTIONS
The following options are available:
-c Always compress, even if the program was started as vnduncompress.
-d Always uncompress (decompress), even if the program was started as vndcompress.
EXIT STATUS
The vndcompress and vnduncompress utilities exit with one of the following values:
0 The operation was performed successfully.
1 An error occurred.
EXAMPLES
To compress an existing CD-ROM file system image, run the following commands:
# vndcompress netbsd.iso netbsd.izo
Note that the resulting compressed image cannot be mounted directly via NetBSD's vnd(4) and mount_cd9660(8) commands any longer. Instead,
you will have to use the -z option of vnconfig(8).
The following example decompresses an existing CD-ROM file system image that was compressed in the cloop2 format into a regular file that can
then be mounted:
# vnconfig vnd0 KNOPPIX.iso
# mount -t cd9660 -o ro /dev/vnd0d /mnt
# vnduncompress /mnt/KNOPPIX/KNOPPIX /var/tmp/knoppix.iso
# umount /mnt
# vnconfig -u vnd0
#
# vnconfig vnd1 /var/tmp/knoppix.iso
# mount -t cd9660 -o ro /dev/vnd1d /mnt
# ls /mnt
.rr_moved cdrom floppy lib opt sbin usr
bin dev home mnt proc sys var
boot etc initrd none root tmp vmlinuz
# umount /mnt
# vnconfig -u vnd1
As an alternative, if your vnd(4) was compiled with VND_COMPRESSION, you can use vnconfig(8) to access the cloop-compressed image directly,
e.g.,
# vnconfig vnd0 KNOPPIX.iso
# mount -t cd9660 -o ro /dev/vnd0d /mnt
# vnconfig -z vnd1 /mnt/KNOPPIX/KNOPPIX
# mount -t cd9660 -o ro /dev/vnd1d /mnt2
# ls /mnt2
.rr_moved cdrom floppy lib opt sbin usr
bin dev home mnt proc sys var
boot etc initrd none root tmp vmlinuz
# df /mnt /mnt2
Filesystem Size Used Avail Capacity Mounted on
/dev/vnd0a 692M 692M 0B 100% /mnt
/dev/vnd1a 1.9G 1.9G 0B 100% /mnt2
# umount /mnt2
# vnconfig -u vnd1
# umount /mnt
# vnconfig -u vnd0
Note how the 1.9GB big filesystem on /mnt2 is mounted from the compressed file stored on the 692MB CD mounted on /mnt. To create a com-
pressed file system image of an existing directory and mount it, run:
# makefs -t ffs include.fs /usr/include
# vndcompress include.fs include.fs.cloop2
# vnconfig -z vnd0 include.fs.cloop2
# mount -o ro /dev/vnd0a /mnt
# ls /mnt
To undo the steps, run:
# umount /mnt
# vnconfig -u vnd0
# rm /tmp/include.fs.cloop2
# rm /tmp/include.fs
SEE ALSO gzip(1), vnd(4), mount(8), mount_cd9660(8), vnconfig(8)AUTHORS
The vndcompress utility was written by Florian Stoehr <netbsd@wolfnode.de>. The vndcompress manual page was written by Florian Stoehr
<netbsd@wolfnode.de> and Hubert Feyrer <hubertf@NetBSD.org>.
BSD December 12, 2005 BSD