I am using the following Command to delete Directory with contents. But this command is deleting inside files only not directories. is there any change need in my command?
find -type f -mtime +3 -exec rm -r {} \;
Thanks (3 Replies)
Hi,
While I am trying SFTP my machine to another unix machine ,
it was working fine till 10 min back.
But now i am getting the below error
"Request for subsystem 'sftp' failed on channel 0"
Could you please someone help me to solve or analyise the root cause...
Cheers:b:,
Mahiban (0 Replies)
Hi everyone,
when executing this command in unix:
echo "WM7 Fatal Alerts:", $(cat query1.txt) > a.csvIt works fine, but running this command in a shell script gives an error saying that there's a syntax error.
here is content of my script:
tdbsrvr$ vi hc.sh
"hc.sh" 22 lines, 509... (4 Replies)
Hi,
I have situation where i need to automate transferring 10000+ files using sftp.
while read line
do
if ; then
echo "-mput /home/student/Desktop/folder/$line/* /cygdrive/e/folder/$line/">>sftpCommand.txt
fi
done< files.txt
sftp -b sftpCommand.txt stu@192.168.2.1
The above... (1 Reply)
I did this:
ls -lrRt | grep ^* | cksum *
but it is showing cksum of sub-directories.
Thanks You
Please use code tags when posting data and code samples, thank you. (3 Replies)
Hi,
I am not able to get output for find command if there are variables defined inside -name option .
Please check below example
1)
###VARIABLES DEFINED
process="fast"
temperature="125c"
voltage="0p935v"
2) I don't get output for below find command
find -L <PATH> -type f \( -name... (2 Replies)
Hello all,
I have a task to patch red hat servers and some servers have a corrupted rpm database and return the error:
Error: rpmdb open failed
I know how to fix this when it occurs. What I'm hoping to do is scan a list of servers by IP and report back which server have this error.
... (6 Replies)
I have if loop with multiple variable value check in if loop. How can i print only if loop satisfied variable and its value in shell script ? I dont want to check each variable in if loop. That makes my script larger.
if ]
then
echo "Only satisfied variable with value"
... (3 Replies)
Discussion started by: prince1987
3 Replies
LEARN ABOUT MOJAVE
curlopt_ftp_create_missing_dirs
CURLOPT_FTP_CREATE_MISSING_DIRS(3) curl_easy_setopt options CURLOPT_FTP_CREATE_MISSING_DIRS(3)NAME
CURLOPT_FTP_CREATE_MISSING_DIRS - create missing dirs for FTP and SFTP
SYNOPSIS
#include <curl/curl.h>
typedef enum {
CURLFTP_CREATE_DIR_NONE,
CURLFTP_CREATE_DIR,
CURLFTP_CREATE_DIR_RETRY
} curl_ftpcreatedir;
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTP_CREATE_MISSING_DIRS,
long create);
DESCRIPTION
Pass a long telling libcurl to create the dir. If the value is CURLFTP_CREATE_DIR (1), libcurl will attempt to create any remote directory
that it fails to "move" into.
For FTP requests, that means a CWD command fails. CWD being the command that changes working directory.
For SFTP requests, libcurl will attempt to create the remote directory if it can't obtain a handle to the target-location. The creation
will fail if a file of the same name as the directory to create already exists or lack of permissions prevents creation.
Setting create to CURLFTP_CREATE_DIR_RETRY (2), tells libcurl to retry the CWD command again if the subsequent MKD command fails. This is
especially useful if you're doing many simultaneous connections against the same server and they all have this option enabled, as then CWD
may first fail but then another connection does MKD before this connection and thus MKD fails but trying CWD works!
DEFAULT
CURLFTP_CREATE_DIR_NONE (0)
PROTOCOLS
FTP and SFTP
EXAMPLE
TODO
AVAILABILITY
Added in 7.10.7. SFTP support added in 7.16.3. The retry option was added in 7.19.4.
RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if the create value is not.
SEE ALSO CURLOPT_FTP_FILEMETHOD(3), CURLOPT_FTP_USE_EPSV(3),
libcurl 7.54.0 February 03, 2016 CURLOPT_FTP_CREATE_MISSING_DIRS(3)