The scenario which I am describing here is strange but not a product of my imagination!
I have a SFTP script which gets file from remote server to a local directory say (/home/dips/ftp/my_files) inside my_files/ there's another sub-dir archive/
The strange scenario is that once while FTPing a huge encrypted file (~570000000 bytes) the file got pulled to archive/ and not to the my_files/ as should be the case. When I saw the file in archive/ I issued the command to move it to my_files/ as the other processes would expect it to be there. And when I executed the below command:
It did that in literally one second!! which is not possible as the file is huge and it takes lots of minutes to move from one directory to another.
Now I am puzzled is the above scenario a plausible one? Please explain
mv has two options:
1. if the file is in the same filesystem from source to destination, just move the file's metadata from one directory to another.
2. If the destination is on another filesystem, then cp the file.
Hello Friends,
I have observed one recent issue about ftp from windows to Linux.
Initially we had Solaris unix and any file sent from windows to solaris via ftp (binary or ascii) worked smoothly.
Say for e.g if I sent a shell script to soalris from windows, that script used to run corectly.... (17 Replies)
Hi Folks,
While transferring file from FTP software like Filezilla the files gets corrupted.
Is there any way I can check if the recently transferred file is in ASCII and not corrupted. I have tried using file -i filename command which does tell if the file character set is ASCII or binary... (6 Replies)
I want to create the tarzip file into a destination directory, i am in /var/sftp/home/archive/rquadri directory and i am using below command. However it is creating the file in the /var/sftp/home/archive/rquadri directory itself instead of /tmp, may i please know how do i resolve this.
tar -cvzf... (5 Replies)
I have a script which has two output formats in which i'am getting the two different output format in str1 and str2.So i want to get the output if the format is like str1 then i have to copy that into a directory or str2 format means it should be moved.This script i'am executing in shell script... (4 Replies)
I am writing a shell script (runs on HP Unix) which copies files from a source directory to another destination daily. The destination directory always have the files with same name as in the source directory. And daily a new file will be created in the source.
cp command works fine if the file... (1 Reply)
Hi all...
Below is what I am trying to do:
1. Having the following folder with the files...
/source_folder/dodiddone.tar.gz
/source_folder/gowentgone.tar.gz
/source_folder/gowentgone.log
2. I need to copy and chown files with extension .tar.gz to another folder
copy... (1 Reply)
Hi guys,
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... (1 Reply)
Hi All,
p_ftp=dummy
time ftp -niv 192.0.0.2 << EOF
user dummy dummy
cd prt/$p_ftp
ascii
ls -ltr
quit
output is
-rw-r--r-- 1 500 500 5137 Mar 04 11:21 dummy.csv
can any one suggest how to get year while using ftp (1 Reply)
Hi,
How to unzip and file which FTP'ed from Windows box?
File name is ABC.ZIP
I tried unzip and gunzip -S .ZIP ABC.ZIP
i am getting following error
gunzip: ABC.ZIP: unknown suffix -- ignored
Any info is appreciated!
~t (10 Replies)