Is it possible to redirect get command inside ftp client?
I was only able to do "get filename /dev/null" to redirect it to /dev/null.. However.. what if I want to redirect it to a compression or decompression utility?
I need to connect to a remote server using a bash script and then delete all files within the directory that are older than 7 days.
Hi,
I'm working on a script which has to copy multiple files from one server to another server.
Following this thread:
http://www.unix.com/ip-networking/19...-ftp-task.html
I have created the following script:
Code:
#!
I have a script a.sh, which has an sftp command:
echo "Starting to sftp..."
sftp xxx@xxx.xxx.xxx.xx << END_SCRIPT
ls
mput *.csv.gz
bye
END_SCRIPT
echo "Sftp successfully."
If I run it interactively, the log output from sftp is shown. However, if I set it in a crontab and redirect the stdout to a file using >, there will be only the output from the two echo statements.
Hi All,
I am new to shell scripting and have a task which need to be completed ASAP.
I have searched all the forum and couln't find excat script which could run on solaris.can someone give me the fully working script for below.
Bash shell script to create user account with paraments as below.
useradd -c "${FNAME} ${LNAME}" -d ${HOMEDIR}/${USERNAME} -m -g ${PRIGROUP} -s ${USERSHELL} $
How do I request a file from a server using netcat? Specifically without touching server computer and just executing a command from client side.
Before.. using ssh or scp, I used command something like this:
ssh user@server-addr "cat /home/user/file.tar" | cat > /dev/null
or
scp user@server-addr:/home/user/file.tar > /dev/null
How can I do the same or similar with netcat?
now i have logged in username : ramesh in unix
Now i have to created script file to login into another user and have run a command inside that user and after executing the command i have to exit from that user.
Inside script, i have to login into su - ram along with password : haihow and have to run chmod command. Any suggestions.
I am trying to make an automatic installer which downloads file from ftp and installs it on system .
Host = "zzz "
USER= "ss"
PASSWD = " xxXX"
FILE = " *.tar"
ftp $HOST << EOF
user $USER
passwd $PASSWD
---#to save in folder /tmp
cd /tmp
mget $(ls -t | head -1) --# to get last file
EOF.
Is this code is proper? And how will I know that the download has finished?