shell script

run multiple command at once : with &&

mkdir testfolder.zip && touch test.zip

NOTE : if the first command fail, the rest will not be executed

touch with last modified date

2015/09/01 at 00:00

touch -t 201509010000 test_old.swf

rm filename is case sensitive

test file will not be deleted when run

rm -f Test

Check file exists

if [ -e "test" ]
then
echo "file exists"
else
echo "file does not exists"
fi

How to check file exists on the remote ssh
http://xmodulo.com/how-to-check-if-file-exists-on-remote-server.html

 

 


Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s