To create a new symlink (will fail if symlink exists already):
ln -s /path/to/file /path/to/symlink
To create or update a symlink:
ln -sf /path/to/file /path/to/symlink
which php | ls -la
cp `which php` destination/directory/path
which php | xargs ls -1 -la
sed 's/sedtest/seedtest/' sedtest.txt > seedtest.txt && mv seedtest.txt sedtest.txt
ln -s TARGET LINK_NAME
To create a new symlink (will fail if symlink exists already):
ln -s /path/to/file /path/to/symlink
To create or update a symlink:
ln -sf /path/to/file /path/to/symlink
#!/bin/bash
# Menu Runner
PS3='Please enter choice: '
opts=("ls" "pwd" "opt3" "Quit")
select opt in "${opts[@]}"
do
case $opt in
"ls")
echo "u chose ls"
;;
"pwd")
echo "u chose pwd"
;;
"opt3")
echo "u typed '$REPLY' which calls '$opt'"
;;
"Quit")
break
;;
*) echo "invalid option $REPLY";;
esac
done
Copyright 2018· All rights reserved