Search Results

Search: Posts Made By: daveu7
823
Posted By daveu7
Calling a remote shell script and applying a DB dump
Hi All,

I have a requirement to call a remote shell script to apply a db dump. The remote shell script will reside in the /root/admin/bin directory and the database dump will be copied by the...
1,254
Posted By daveu7
SQL block in a Shell Script connecting to a local and remote DB
Hi All,

In a Shell scriipt with a SQL block I want to issue a query against a local DB and a remote DB on a remote server. The shell script is running locally.
This is how I connect to the local...
935
Posted By daveu7
Using the find command
Hi all,

1). Is is possible to use the date builtin and subtract a literal e.g 1 day in bash alongwith the find command from the command line:

e.g

find . -name --date %Y-%m-%d - 1

2). I...
49,495
Posted By daveu7
Restricting a Find search to the current directory only
Hi All,

I am trying to delete file (with a mtime older than 2 days) from the current directory ONLY using:

find . -daystart -maxdepth 1 -mtime 2 -exec rm {} \;

but this doesn't seem to work...
15,132
Posted By daveu7
Interpreting Shell Script errors when called from CRON
Hi All,

I am calling a series of shell scripts via CRON so everything is running as root. However, in my error log file I am seeing the following errors. Please can anyone offer any advise as to...
5,037
Posted By daveu7
Propagate exist status from a child shell script to a parent.
Hi All,

I have a parent shell script A and a child shell script B.

1). If a command i.e a mysqdump fails in shell script B fails then I trap the error with this code


if [[ $?>0 ]]
...
4,212
Posted By daveu7
Hi Corona688, I have implemented the changes...
Hi Corona688,

I have implemented the changes you suggested and I am still getting the same file or directory not found error. I am running the script as CRON (which always runs as root) so you...
4,212
Posted By daveu7
Further questions after testing the revised tar structure
Hi All

I have modified the tar command as discussed in this thread.
But now I am getting a

tar: : Cannot stat: No such file or directory
tar: Error exit delayed from previous errors...
4,212
Posted By daveu7
Hi Corona688, Please can you explain your...
Hi Corona688,

Please can you explain your last two sentences at little further.
Do you mean I have to exclude the archive I am building as well ?

My reasons for doing all this are that I am...
4,212
Posted By daveu7
Executing a tar command with the --exclude option in a Debian shell script.
Hi All,

I am trying to execute the following tar command with two --exclude options to suppress extract of the two directories specified.

Do I need to single quote the directory paths ??
Many...
6,966
Posted By daveu7
Comparing a String variable with a string literal in a Debian shell script
Hi All,

I am trying to to compare a string variable with a string literal inside a loop but keep getting the

./testifstructure.sh: line 6: [{BOOK1}: command not found
2

Please can anyone...
6,022
Posted By daveu7
TAR Error - file changed as we read it
Hi All,

I am getting the above error when I execute the following in a shell script called by Cron.

tar -cvf ${WORKING_BACKUP_ROOT}/${TAR_ARCHIVE_FILE} . >/${BACKUP_ROOT}/${ARCHIVE_LOG}
...
1,249
Posted By daveu7
Dot and redirected output syntax in a tar command
Hi All,

Please could anyone advise what the purpose of the dot syntax in the following command means:
tar -cvf ${WORKING_BACKUP_ROOT}/${TAR_ARCHIVE_FILE} . >/${BACKUP_ROOT}/${ARCHIVE_LOG}

Many...
Showing results 1 to 13 of 13

 

Featured Tech Videos

All times are GMT -4. The time now is 09:27 PM.
Unix & Linux Forums Content Copyright 1993-2019. All Rights Reserved.
Privacy Policy