| | |
A shell script that makes backup copies of changed files (also involving CRON)
![]() |
•
•
Join Date: May 2008
Posts: 82
Reputation:
Solved Threads: 0
Re: A shell script that makes backup copies of changed files (also involving CRON)
0
#11 Aug 30th, 2009
Rome wasnt built in a day right? Even though I have to get Rome done in alot less days....
AFAIK, pwd is just a function that returns the current path and $PWD is just a variable that changes each time Im at a new path.
Correct? So the best way (IMO) would be just simply using path...
•
•
•
•
Take your pick
bash Syntax (Toggle Plain Text)
sk@sk:~$ pwd /home/wheel/sk sk@sk:~$ echo ${PWD} /home/wheel/sk
Correct? So the best way (IMO) would be just simply using path...
Re: A shell script that makes backup copies of changed files (also involving CRON)
0
#12 Aug 30th, 2009
you shouldn't be cd'ing in a shell script to do backups in my opinion so that should be irrelevant.
•
•
Join Date: May 2008
Posts: 82
Reputation:
Solved Threads: 0
Re: A shell script that makes backup copies of changed files (also involving CRON)
0
#13 Aug 31st, 2009
Re: A shell script that makes backup copies of changed files (also involving CRON)
0
#14 Aug 31st, 2009
Well pwd gives you the current directory. In a shell script if you're not using 'cd' then the result of 'pwd' would never change -- thus raising the question of why use it?
![]() |
Similar Threads
- load-intensive shell script (Shell Scripting)
- Script to delete or backup logs at a specific time and under specific user (Shell Scripting)
- Shell Script to Zip / FTP / Delete transactional files. (Shell Scripting)
- For Pay Shell Script - Zip / FTP / Delete transactional files (Shell Scripting)
- shell script fo backup archiving (Shell Scripting)
- Korn Shell Script for deleting files older than 2 months (Shell Scripting)
- c++ or shell script to delete some files (C++)
- How to delete files in UNIX using shell script (Shell Scripting)
- Shell Script Help (Shell Scripting)
Other Threads in the Shell Scripting Forum
- Previous Thread: Change Layout
- Next Thread: How can i display time 5mins ago on Solaris 10
| Thread Tools | Search this Thread |







