hello,
i am trying to get a list of files to be scped from the remote server
by running the below in my local unix server ( note - there is a passwordless connectivity setup made between the local and remote server) and, we use KSH.
---
Code:
ssh $scp_host "find /a/b/c/*/ -iname "$remote_file"" > list.dat
the above pulls all the files that matches the pattern fro
How to use SFTP to get the files on unix server from anoter unix server without sending the password.
This is below script wrote
------------------------------------
#!/bin/ksh
#!/usr/local/bin/expect
sftp -oPort=<PORt_number> <Ipaddress> <<EOF
expect "password:"
send <password>
cd /test/test1
mget *.csv
bye
EOF
---------------------------------------
after runni
I am writing a scritp in which first step is to get some files from a server.
I am using mget to do that.
here is my FTP code ...
HOST="XXX.XXX.com"
28 ftp -inv $HOST <<END &> $FTP_LOG
29 quote USER $USER
30 quote PASS $PASWD
31 cd log
32 prompt off
33 binary
34 mget files*.log
35 bye
36 END
yesterday everthing was working fine..
but now i am not able to get mo
Hi All,
Let me know how can i find and delete files from one unix server to another unix server which are 'N' days older.
Please note that I need to delete files on remote unix server.So, probably i will need to use sftp, but question is how can i identify files and folders which are 'N' days older.
Hi,
I want to limit only files with approved extensions such as ".gif", ".jpeg", ".doc", etc. are allowed to be uploaded to the web server.
Hi!
I'm a bit of a unix n00b so be gentle! I need to use ftp to download some files. I have the ftp running in a shell script which had been working perfectly last week. I downloaded around 400 files before it broke on friday.
Now whenever I try to run the script, it starts to download files and then stops arbitrarily in the middle of the first mget.
I need to archive the older than 30 day file to another uinx server.I have wrote the below uinx script.
Code:
for LOOK_DIR in /TempFiles
do
for FILE in `find ${LOOK_DIR} -mtime -30 -exec ls {} \;`
do
echo ${FILE} >> file_list ## This file will have the list of files copied and removed
done
done
#************
I have a huge list of files in an Unix directory (around 10000 files).
I need to be able to search for a certain keyword only within files that are modified between certain date and time, say for e.g 2012-08-20 12:30 to 2012-08-20 12:40
Can someone let me know what would be the fastest way to perform this search?
I tried using find .
Hi
I was backing up my home dir when I found many ".jpg.pnj" and ".zip.id3" files. The ".pnj" files seem to be thunbnails for the ".jpg" files I have.