If i do it your way with out using the -C /tmp, i see 2 issues.
1) After creating the tar file i did tar -zxvf FCBTEXAS_20130930_v2.xml.tgz, it is creating the subdirectories /var/sftp/home/archive/rquadri which i don't want to create, i just want to unzip & untar the file, in which ever directory i am in.
It does that either way. This is normal behavior.
Quote:
2) why is it removing leading / from member names, is this an error?
This is standard behavior for GNU tar. It assumes that you don't necessarily want to overwrite /var/sftp/home/archive/rquadri/filename every time you extract the tar -- you want to extract it in the current folder, or something given by -C. If it stored the absolute path, that'd override everything, so it strips the first / off.
I believe this is what you want:
This tells it to chdir into /var/sftp/home/archive/rquadri before doing anything. It will still create the tar in /tmp/ because that was given an absolute path.
hello, im a newbie in unix scripting. can someone pls send me a sample script that will tar files in the folders of a specific directory, but will exclude specific files, and afterwards, will ftp the tar into another server.
for example:
in this directory, pshrprod:/opt/psoft/weblogic/818sp9_80... (2 Replies)
I am adding some individual files to a tar archive and would like them to be added to the archive without any directory hierarchy, even though the files themselves exist in levels of hierarchy. Unfortunately, tar seems to always preserve the directory hierarchy when it adds the files.
Here is... (2 Replies)
I am trying to move file created/modified in 2008 year to <new directory>. But trapped badly in Xargs {}.
Looks like mv is not getting destination file properly. It assumes source file s to be destination directory n gives me erroir. "Target must be a directory"
Run-
#/home/mktrisk: find... (4 Replies)
Hello. I`m writing a bash script who archive log files and send them to backup server. I need some kind of checking mechanism for *.tar.gz files.
I found something like: gunzip -t file.tar.gz //Not output from it.
And for tar: tar tf file.tar.gz //Only lists archive
1.) I need make a... (3 Replies)
Following are the list of files available in the dataout directory
a1.txt.gz
a2.txt.gz
b3.txt.gzStep 1:
now the tar file needs to be created as follows.
tar -cvf ab.tar *.gzAll the files with extn .gzg has to be bundled in the tar file.
Once the tar file is created, the files which are... (9 Replies)
Hello Team,
Is there any Linux command / script available so that, I could create a simple 0 byte file in destination server by issuing the command from source server.
If yes, Could you please let me know the possible solutions.
in other words I just want to create a touch file in my home... (1 Reply)
Quick question,
is it possible to make a Tar of completely directory and placing the tar file in it (will this cause even the tar file to tarred ?)
sample:
/opt/freeware/bin/tar -cvf - /oracle | gzip > /oracle/backup.tgz
will the tar file backup.tgz also include backup.tgz ?
i tried... (5 Replies)
Hi All,
Daily i am doing the house keeping in one of my server and manually moving the files which were older than 90 days and moving to destination folder.
using the find command . Could you please assist me how to put the automation using the shell script .
... (11 Replies)
I have a script, which is checking if file exists and move it to another directory
if
then
mkdir -p ${LOCL_FILES_DIR}/cool_${Today}/monthly
mv report_manual_alloc_rpt_A_I_ASSIGNMENT.${Today}*.csv ${LOCL_FILES_DIR}/cool_${Today}/monthly
... (9 Replies)
Discussion started by: digioleg54
9 Replies
LEARN ABOUT PHP
sftp-server
sftp-server(1M) System Administration Commands sftp-server(1M)NAME
sftp-server - SFTP server subsystem
SYNOPSIS
/usr/lib/ssh/sftp-server
DESCRIPTION
sftp-server implements the server side of the SSH File Transfer Protocol as defined in the IETF draft-ietf-secsh-filexfer.
sftp-server is a subsystem for sshd(1M) and must not be run directly. There are no options or config settings.
To enable the sftp-server subsystem for sshd add the following to /etc/ssh/sshd_config:
Subsystem sftp /usr/lib/ssh/sftp-server
See sshd_config(4) for a description of the format and contents of that file.
There is no relationship between the protocol used by sftp-server and the FTP protocol (RFC 959) provided by in.ftpd.
EXIT STATUS
The following exit values are returned:
0 Successful completion.
>0 An error occurred.
FILES
/usr/lib/sftp-server
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWsshdu |
+-----------------------------+-----------------------------+
|Interface Stability |Evolving |
+-----------------------------+-----------------------------+
SEE ALSO sftp(1), ssh(1), ssh-add(1), ssh-keygen(1), sshd(1M), sshd_config(4), attributes(5)
To view license terms, attribution, and copyright for OpenSSH, the default path is /var/sadm/pkg/SUNWsshdr/install/copyright. If the
Solaris operating environment has been installed anywhere other than the default, modify the given path to access the file at the installed
location.
AUTHOR
Markus Friedl
SunOS 5.10 30 Jul 2003 sftp-server(1M)