Looking into the /var/log/scripts I noticed most seem to use a formula that looks like this
where command is something like linking, removing etc.( cd usr/lib64 ; <command> )
I am pretty sure, we must be at / to do this as there is no prefix / as in /usr/lib64
question 1
Can I use this command and get away with it?
Code: Select all
( cd usr/lib64 ; rm -rf file1 file2
if [ -f file3 ] ; then rm -rf file3 fi )
question 2
If not, is this acceptable
Code: Select all
cd /usr/lib64
rm -rf file1 file2
if [ -f file3 ] ; then rm -rf file3 fi
cd /
I want to get something right before attempting to post something for a new module.
Thanks for reading