General :: File Transmission Through FTP To Destination?

Jul 9, 2011

We used to send files in the form of .jpg, .tif, and/or .pdf. Normally the file name will be in the form of 08072011IE01CTYHUB.PDF (DDMMYYYY - is the date, IE - publication, 01 - page number, CTY - edition name and HUB - destination in three characters). These files will be stored in a common folder (say SOURCE). I need a script to move these files to destination by reading the destination from the file name through FTP. At destination these files should be moved to a folder meant for CTY. Please note before the file is sent through FTP it should be compressed (zipped) At SOURCE folder the files will be as:

08072011IE01CTYHUB.pdf
08072011IE01CTYSMG.pdf
08072011IEdavanamCTYHUB.pdf
08072011IEversaVANSMG.tif

etc. where first 8 characters are date in the form of DDMMYYYY, next 2 characters are publication, last 3 characters are destination, previous 3 characters are edition and left over in the middle are page number in the form of NN or name. Presently I am zipping these files and send it through FTP to the destination. At destination my counterpart takes the file, stores in appropriate location (like folder name CTY) for use. To automate the above process, I want a script.

View 1 Replies


ADVERTISEMENT

General :: Copy Certain File Types Recursively While Maintaining File Structure On Destination?

Jun 14, 2011

I have just been bothered by a fairly small issue for some time now. I am trying to search (using find -name) for some .jpg files recursively. This is a Redhat environment with bash.

I get this job done though I need to copy ALL of them and put them in a separate folder BUT I also need to keep the order intact after copying.

For e.g - If I get a JPG file under /home/usr/new/1/ then the destination also needs to be /test/old/new/1/.

At the moment, I am simply putting all files under /test/old/ and I can't somehow get the later /new/1/ folder path created under /test/old/

I understand this could well be done using while OR if else loop, though if someone can just guide me with a hint, I would be really grateful.

I will complete the rest of the steps and was asking here since I am still not comfortable with the shell/bash scripts yet and planning to be really good at it over the next couple of months.

View 1 Replies View Related

General :: Copy File Whose Source Path Is Mentioned In File To Specified Destination

Jun 3, 2010

I had a situation in which the the path of the file to be copied is written in other file and I had to copy it using shell script..I can use cp $(cat /home/robert/location.txt) /media/sda1 on normal linux shell...But I am using buildroot script where $(cat /home/robert/location.txt) evaluate to nothing..is just blank..

View 1 Replies View Related

General :: Renaming Files With Sed - Mv: Missing Destination File Operand After `$i'

Mar 20, 2011

Today i am trying to learn how to use sed. I set up a testing folder with the following files:

AAb.lol
AAc.lol
AAx.lol
test.sh

My goal is to create a script (test.sh) which renames all the files to their original name without AA. I want to end up with this:

b.lol
c.lol
x.lol
test.sh

sed seemed to be the perfect tool so i went ahead and created a script which i think should clear the job.

[Code].........

mv: missing destination file operand after `$i' From that 2nd line i can tell that $NewName is just empty. I also read something about sed needing the -e option for scripting purposes but i just don't understand it.

View 7 Replies View Related

General :: Move Folders That Contain A File With A Specific Extension To A Destination Folder?

Oct 3, 2010

Many years ago, I converted a portion of my files to an arbitrary format with a specific extension. i no longer desire to have them in this format and i would like begin the process of replacing them because conversion is not an appropriate solution. unfortunately, they are mixed in separate folders of the same root folder with files in my current format of a different extension. I feel it would make this process easier if I were to move every folder that contained a file with the undesired format to a separate root folder. The files are stored on a Linux server and shared via samba. How can I do this with a couple of commands or a script? I am open to other suggestions as well. I want to avoid time spent editing text files. Ultimately, I'd like a command that produced a list of full paths for folders, sorted by the number of levels would be a nice touch. A list of all of the files is clearly not what I'm looking for.

View 2 Replies View Related

General :: Copy File Recursively Ignoring Destination Directory Structure?

Jul 8, 2011

I have the following content on the source directory:

source/foo.txt
source/bar/another_file.txt
source/bar2/and_another.txt

I want copy those files to a destination directory which, after copy, shall look like this:

destination/foo.txt
destination/another_file.txt
destination/and_another.txt

How can I do this? It seems that "cp" lacks such an option

View 1 Replies View Related

General :: Program To Convert Audio File Of Fax Transmission To Image?

Dec 2, 2010

I have a number of uncompressed audio files recorded off of an analog (POTS) telephone line of fax transmissions. Is there a Linux utility or library I could use to convert these files into images of the fax they contain? I'm not looking to send/receive a fax via a modem, but just to "replay" the communications tones and parse out the fax message.I'm guessing this may not be possible due to duplex issues and not knowing which end of the conversation is sending what,but thought I'd ask to see if anyone knew of something.

View 4 Replies View Related

Ubuntu :: Transmission Web Interface Only Available When Transmission Client Is Running

Dec 5, 2010

I can only access the Transmission web interface while the Transmission-gtk client is running. When I close it, the web interface is no longer available. I try to manually start the transmission-daemon, but the process never shows up as running.

View 2 Replies View Related

Server :: RSync Without Delete Any File On The Destination?

Feb 16, 2010

I'm using rsync for a backup-sript at the moment and want to keep all files. The files are always unique, so I want to rsync without delete any file on the destination.

I've tried with --no-delete and --max-delete=0 but nothing seens to work. Is there even a possibility to do so?

View 2 Replies View Related

Software :: When Copy Files Between Two Samba Shares From Windows Machine \ Copies The File Through PC To The New Destination?

Apr 17, 2011

I recently replaced my windows fileserver with one running Ubuntu. One thing I've noticed (which is a annoying) is that when I copy files between two samba shares from my windows machine, it copies the file through my PC to the new destination. On windows shares it just did some sort of local copy (ie it took about 2 seconds) rather than 3-4 minutes. Is this the normal behaviour, is there any way around it on Linux

View 5 Replies View Related

General :: Cp - Mv Destination Name Change

May 26, 2010

When I use the cp or mv command to copy/move files is there a way for me to have the destination file assume the same name of the source file, however add an additional suffix.

For example

Code:

Now what if I wanted this...

Code:

Do I have to type the destination file out manually everytime? or is there a quick way for the cp or mv command to assume the source file name and add the .bak

View 5 Replies View Related

General :: Specifying A Destination Path While Creating A Zip?

Feb 5, 2010

Let us assume I have a zip file called patch.zip, when I run unzip -l patch.zip I get the following output.

bin/a
bin/b
lib/c

To this zip file I want to add a new file, "Readme.txt" located at /path/to/Readme.txt in such a way that, when I re-run unzip -l patch.zip again I get something like this

bin/a
bin/b
lib/c
doc/Readme.txt

View 2 Replies View Related

General :: Gunzip To A Different Destination Directory?

May 9, 2010

how do I gunzip to a destination directory other than the current one?

this did not work:

gunzip *.gz /putthemhere/

View 2 Replies View Related

General :: What Is Source / Destination Ports

Mar 9, 2011

I want to know what is a source port and what is a destination port.

View 7 Replies View Related

General :: RSYNC - Ignore A Directory On Destination Box?

Jul 28, 2011

I am performing a dry run using Rsync on 2 different boxes.While i'm doing that, Under destination directory, I want a specific directory x to be ignored for sync.Please let me know the exact pattern to ignore the directory.The current command I'm using is:rsync -avnc --delete $LOCAL_DIR $USERNAME@$DESTINATION_IP:$REMOTE_DIRunder DESTINATION_IP, I would want to ignore a particular directory under REMOTE_DIR.

View 1 Replies View Related

General :: Specifying Destination Directory When Installing Slackware ?

Jan 25, 2010

I'm trying to install Slackware package into some specific locations, like for example, I want to put Linux base package into at / and put applications on /usr/local. However when I'm installing using "setup" program, I cannot find a part that let me to choose the installation destination.

At "setup install" option, it gives six different installation method like full, newbie, menu, expert, custom, and tag path. But none of them (I cannot find it) gives an option where to put the installation package to.

View 2 Replies View Related

General :: Copying Files From Multiple Locations To One Destination

Feb 21, 2011

Suppose I have a tree structure like this:
/home/mahmood/sim/a/b/file1.cpp
/home/mahmood/sim/a/b/file2.h
/home/mahmood/sim/a/c/file3.txt
/home/mahmood/sim/d/file4.txt

How can I copy all of them to /home/mahmood/sim. So that when I run "ls" in /home/mahmood/sim, I see all files:
file1.cpp
file2.h
file3.txt
file4.txt

Can 'cp' search for all file and copy them in another folder?

View 3 Replies View Related

General :: Files Seem To Take Up More Space In Destination After Rsync Copy?

Feb 9, 2010

I have recently purchased an external hard drive in order to backup my home partition. In my PC I have a "1.5T" drive with several partitions on it, containing OSes and the home partition. The home partition is 1.3T according to df, the external drive contains one partition that spans the entire disk,df reports it as 1.4T in size. Both partitions are ext3. When I use rsync to copy files from the home partition to the external partition, the external disk becomes full, despite the destination - supposedly - being larger than the source. I don't understand why copying files from one partition to a slightly bigger partition should need more space than on the source partition. Does anyone know what is happening ?

Details : I created the partition on the external drive with gparted; gparted reported it the already have several gigabytes in used space immediately after the partitions creation - I thought at the time that this must be normal. The home partition contains many files of all sorts, including lots of big audio and video files. If you are wondering, for all my important files this external disk is only secondary backup, as they are also backed up to the "internet".

These are the mount points :

/mnt/tmp/ : home partition, /dev/sdb6
/mnt/external/ : external partition, /dev/sdc1

I used rsync to copy the files, I know there are more efficient ways to do this, but I wanted to use the same command that I will subsequently run to sync the backup.

rsync -av --progress --stats --recursive --perms --links --delete /mnt/tmp/ /mnt/external/

Next I tried adding the --sparse switch, as I was wondering if the problem may come form sparse files. I don't know however if rsync would go back and shrink the sparse file by just adding the switch and executing the command. I also added --one-file-system, for good measure. Here is what I ran next :

rsync -av --progress --stats --sparse --one-file-system --recursive --perms --links --delete /mnt/tmp/ /mnt/external/

I tried an fsck on the home partition :

fsck -f /dev/sdb6

This is the output from the last rsync :

rsync: writefd_unbuffered failed to write 4 bytes to socket [sender]: Broken pipe (32)
rsync: write failed on "abcd.avi": No space left on device (28)
rsync error: error in file IO (code 11) at receiver.c(302) [receiver=3.0.6]

[code]....

Looking at the destination after a partial copy seems to indicate that the problem is not symbolic links being "expanded". I have not checked the source filesystem for sparse files, nor the destination to see if these files could be larger there, as this does not seem trivial.

Here is some additional info :

$ df /mnt/tmp/
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sdb6 1415342836 1414173740 369096 100% /mnt/tmp

[code]....

View 2 Replies View Related

General :: Rsync Deleting Files From Destination Directory?

Jul 14, 2011

We have an rsync cron job set up to mirror all the files in a "..dashtdocsdocs" folder to the same folder on another server. It copies all the files over correctly and deletes any files in the "docs" directory that aren't in the sending directory, but it also deletes any files we put in the target directory's parent folder (..dashtdocs or other subfolders like ..dashtdocsimages) even though they've been excluded in the .rsync-filter file.

Here's our current rsync .sh:

/usr/local/bin/rsync --stats -qPzrtpl --delete --password-file=/var/run/.appprodrsync --log-file=/export/home
/webuser/logs/rsync-extranet-log -FF /export/home/ appprodrsync@appprod::dprweb_extranet/ > /export/home/webuser/logs/rsync-extranet-output 2>&1

[code]....

So for example server A has ..dashtdocsdocs and ..dashtdocsimages. Server B has ..dashtdocsdocs but if I manually copy the images folder over to ..dashtdocsimages, the images folder gets deleted from the target directory every time rsync runs.

A: ..dashtdocsdocs
..dashtdocsimages
B: ..dashtdocsdocs
..dashtdocsimages (<-- gets deleted everytime rsync runs)

I'd like to keep just the docs directory synched and update other folders manually, but they keep getting deleted. It looks to me like it's running a delete-excluded option, but that option wasn't used.

View 2 Replies View Related

General :: Run The Same Command(s) On The Many Destination Servers From Source Server?

Jan 4, 2011

I am trying to run the same command(s) on the many destination servers from my source server.source server user "report" ssh keys are added to all destination hosts.

hosts.cfg:
----------
gadikota_dev01

[code]....

View 3 Replies View Related

General :: Define Both Source/Destination AND Direction When Building Firewall?

May 30, 2011

why do we have to define both Source/Destination AND Direction when building firewall.Isn't direction= source->destination? what would happen if source and destination were swapped?

View 3 Replies View Related

General :: Cannot Access/ping Debian \ Gives Destination Host Unreachable?

Nov 27, 2010

I cannot access/ping my Debian server. I know the IP is right (ifconfig, route and ip addr) all gave me 10.0.2.25 (route gave me 10.0.2.0).I cannot ping it from any computer in my netwerk, even when I try to ping it from my Debian itself, it gives me Destination Host Unreachable !(Wierdly, I can ping 10.0.2.2 tho).I am using virtualbox when the netwerk options 'NAT' turned on. When I look at my /etc/network/interfaces/ the last line looks like:iface eth0 inet dhcpShouldn't their be some other stuff listed?

View 6 Replies View Related

General :: Cloning With The Dd Command - Source Being Copied Onto Bad Sectors On The Destination Disk?

Apr 17, 2011

To make a full backup I run a live Knoppix DVD and clone the computer's HDD to an external HDD using the dd command. Is there a possible problem with the source being copied onto bad sectors on the destination disk? If so is there a way to prevent this from happening? A typical dd command I use looks like: dd if=/dev/sda of=/dev/sdb bs=4096 conv=notrunc,noerror. Is this the recommended command for cloning to a disk of equal size?

View 1 Replies View Related

General :: Change /temp Directory From Its Original /dev/hda8 To Destination /dev/hdd5?

Dec 7, 2009

On Debian Standard System I would like to is change /tmp directory from it's original /dev/hda8 to destination /dev/hdd5

Code:

Disk /dev/hda: 6448 MB, 6448619520 bytes
255 heads, 63 sectors/track, 784 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

[code]...

If I change /dev/hda8 to /dev/hdd5 and reboot the startx command fails to run.

View 7 Replies View Related

General :: Update Cannot Find Transmission-common

Apr 5, 2010

I can no longer update Fedora because it fails and hangs on trying to update package "transmission-gtk" due to a dependency "transmission-common" whose source cannot be found. How do I fix this and how can linux update break itself so badly that it adds dependencies to itself without checking for their sources first?

View 5 Replies View Related

General :: Torrent Or Transmission Started But Uncompleted?

Dec 21, 2010

If you start a transmission then shutdown unintentionally, what happens to transmission? This hasn't happened recently, but the question sticks in my mind. I was downloading 2 files. I opened raw package which, at the time I didn't have BT or FDM or any other type of transmission at that point I shutdown system. I'm assuming it picked up after restarting computer. Anyway what I really want to know is if I only shutdown os and not the transmission, when does it actually stop?

View 3 Replies View Related

General :: Set A Password For Transmission-daemon, The BitTorrent Client Server?

Feb 26, 2010

The config file is ambiguous, and keeps getting overwritten when you restart the daemon in Debian, anyway.

In /etc/transmission-daemon/settings.json, there are these options:

rpc-username
rpc-password
proxy-auth-username
proxy-auth-password

Every time I restart the daemon with:

/etc/init.d/transmission-daemon restart

It overwrites rpc-password, and the password it prints doesn't work anyway.

Does anyone know how to set the password properly? I don't want to disable it.

View 1 Replies View Related

General :: How Does Cp Command Determine Source And Destination Locations In Command?

Apr 14, 2011

When you run the following cp command in the BASH terminal, how does Linux know which files are the source and which are the destination when copying multiple files from one location to another?How does Linux know that the services, motd, fstab, and hosts files are the source and the /home/fred/my_dir is the destination?This question came up in a Linux class and I was not sure of the answer. I was thinking it is based on the source path entered ending with a file path and the destination being a directory, but was not sure.

View 4 Replies View Related

Ubuntu :: Scapy Can't Find Destination MAC?

Aug 10, 2010

I'm making a program that uses Scapy to sniff for a packet being sent to a certain host, then sending another packet with the Ethernet, IP and TCP headers identical, but a different payload.Whenever I try to run this, however, I get these errors:Code:WARNING: No route found for IPv6 destination :: (no default route?)WARNING: Mac address to reach destination not found. Using broadcast.Does anyone know what I can do to fix these problems?

View 2 Replies View Related

Networking :: Unable To Connect Destination IP?

May 20, 2011

When I ping the router 165.213.100.1, i get the following proper response.

[root@ ~]# ping 165.213.100.1
PING 165.213.100.1 (165.213.100.1) 56(84) bytes of data.
64 bytes from 165.213.100.1: icmp_seq=1 ttl=62 time=0.860 ms

[code]...

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved