11-29-2010
-$ sftp -b ./sftp_commands1 server1
sftp> progress
Progress meter enabled
sftp> mget *
Fetching /home/user1/file1 to file1
/home/user1/file1 100% 7 0.0KB/s 00:00
Fetching /home/user1/file2 to file2
/home/user1/file2 100% 7 0.0KB/s 00:00
Fetching /home/user1/file3 to file3
/home/user1/file3 100% 19 0.0KB/s 00:00
Fetching /home/user1/file4 to file4
/home/user1/file4 100% 7 0.0KB/s 00:00
Fetching /home/user1/file5 to file5
/home/user1/file5 100% 7 0.0KB/s 00:00
sftp> quit
$ sftp -b ./sftp_commands1 server1 >> log1
$ cat log1
sftp> progress
Progress meter enabled
sftp> mget *
Fetching /home/user1/file1 to file1
Fetching /home/user1/file2 to file2
Fetching /home/user1/file3 to file3
Fetching /home/user1/file4 to file4
Fetching /home/user1/file5 to file5
sftp> quit
As you can see progress/status lines are gone.
V
Last edited by vilius; 11-29-2010 at 04:30 AM..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have written a menu driven script to walk users through bringing up and down an application process.
Sometimes the user tells me the script does not work taking the application down, but he can't recall seeing an error message.
Is there a way to capture std out and stderr out from an... (6 Replies)
Discussion started by: MizzGail
6 Replies
2. UNIX for Advanced & Expert Users
Can i run the SU command in a non interactive mode. What i want to do is to pass the username and the password as commandline or batch parameters. Please let me if its possible and how to pass them. A sample file will be appreciated.
Thanks, (6 Replies)
Discussion started by: rohitag
6 Replies
3. UNIX for Dummies Questions & Answers
Hi folks,
Please advise which command/command line shall I run;
1) to display the command and its output on console
2) simultaneous to save the command and its output on a file
I tried tee command as follows;
$ ps aux | grep mysql | tee /path/to/output.txt
It displayed the... (7 Replies)
Discussion started by: satimis
7 Replies
4. Shell Programming and Scripting
I have a file with stats for different month, I use the cat and grep combination to search for different month.
cat <file> | grep "April"
cat <file> | grep "May"
cat <file> | grep "June"
etc.
How do you make this command interactive. So that I can give the values for the search. Thanks... (7 Replies)
Discussion started by: purelltab
7 Replies
5. UNIX for Dummies Questions & Answers
HI Guys,
I hope you are well. I am trying to write a script that gets executed every time i open a shell (cshell). I have two questions about that
1) I need to enter these commands
$ echo $DISPLAY
$ setenv $DISPLAY output_of_echo_$display_command
How can i write a... (2 Replies)
Discussion started by: kaaliakahn
2 Replies
6. Shell Programming and Scripting
Hello experts,
I have a to write script for monitoring, the script would use a command and I plan to write the script as follows
while true
do
command -arg
sleep 2
clear
done
The output would be set up on a screen for monitoring. However the issue is that the command used in... (2 Replies)
Discussion started by: maverick_here
2 Replies
7. Shell Programming and Scripting
Hello All,
I was wondering how to capture the output of an "interactive" command that is run...? I think "interactive" is the
word I'm looking for. For example, commands like "top" and "iftop"...
The One I'm trying to work with is "iftop". When you run "iftop" from the command line it begins... (2 Replies)
Discussion started by: mrm5102
2 Replies
8. UNIX for Dummies Questions & Answers
Hi Guys,
I like to output every command executed in the script to a file.
I have tried set -x which does the same.
But it is not giving the logs of the child script which is being called from my script.
Is there any parameters in the Set command or someother way where i can see the log... (2 Replies)
Discussion started by: mac4rfree
2 Replies
9. Shell Programming and Scripting
I am using UNIX to create a script on our system. I have setup my commands to append their output to an outage file. However, some of the commands return no output and so I would like something to take their place.
What I need
The following command is placed at the prompt:
TICLI... (4 Replies)
Discussion started by: jbrass
4 Replies
10. Shell Programming and Scripting
i use this command to make pkgadd non-interactive.
Command1:
echo | sudo /usr/sbin/pkgadd -n -a /u/base/admin -r silent.txt -d /tmp/dbs.pkgThis works fine if i run it as root user but when i run it with non-root user it prompts me for the password and then executes successfully thus making it... (9 Replies)
Discussion started by: mohtashims
9 Replies
LEARN ABOUT OSX
sftp-server
SFTP-SERVER(8) BSD System Manager's Manual SFTP-SERVER(8)
NAME
sftp-server -- SFTP server subsystem
SYNOPSIS
sftp-server [-ehR] [-d start_directory] [-f log_facility] [-l log_level] [-u umask]
DESCRIPTION
sftp-server is a program that speaks the server side of SFTP protocol to stdout and expects client requests from stdin. sftp-server is not
intended to be called directly, but from sshd(8) using the Subsystem option.
Command-line flags to sftp-server should be specified in the Subsystem declaration. See sshd_config(5) for more information.
Valid options are:
-d start_directory
specifies an alternate starting directory for users. The pathname may contain the following tokens that are expanded at runtime: %%
is replaced by a literal '%', %h is replaced by the home directory of the user being authenticated, and %u is replaced by the user-
name of that user. The default is to use the user's home directory. This option is useful in conjunction with the sshd_config(5)
ChrootDirectory option.
-e Causes sftp-server to print logging information to stderr instead of syslog for debugging.
-f log_facility
Specifies the facility code that is used when logging messages from sftp-server. The possible values are: DAEMON, USER, AUTH,
LOCAL0, LOCAL1, LOCAL2, LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7. The default is AUTH.
-h Displays sftp-server usage information.
-l log_level
Specifies which messages will be logged by sftp-server. The possible values are: QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1,
DEBUG2, and DEBUG3. INFO and VERBOSE log transactions that sftp-server performs on behalf of the client. DEBUG and DEBUG1 are
equivalent. DEBUG2 and DEBUG3 each specify higher levels of debugging output. The default is ERROR.
-R Places this instance of sftp-server into a read-only mode. Attempts to open files for writing, as well as other operations that
change the state of the filesystem, will be denied.
-u umask
Sets an explicit umask(2) to be applied to newly-created files and directories, instead of the user's default mask.
For logging to work, sftp-server must be able to access /dev/log. Use of sftp-server in a chroot configuration therefore requires that
syslogd(8) establish a logging socket inside the chroot directory.
SEE ALSO
sftp(1), ssh(1), sshd_config(5), sshd(8)
T. Ylonen and S. Lehtinen, SSH File Transfer Protocol, draft-ietf-secsh-filexfer-00.txt, January 2001, work in progress material.
HISTORY
sftp-server first appeared in OpenBSD 2.8.
AUTHORS
Markus Friedl <markus@openbsd.org>
BSD
January 4, 2013 BSD