Skip to content

Instantly share code, notes, and snippets.

@hansspiess
Last active October 30, 2016 10:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hansspiess/2e4a8bb1e4b233c06064 to your computer and use it in GitHub Desktop.
Save hansspiess/2e4a8bb1e4b233c06064 to your computer and use it in GitHub Desktop.
useful terminal commands
# find all php.ini files on machine from terminal.
mdfind php.ini | grep php.ini
# copy local file to remote machine via scp
scp -P 92 /path/filename.ext user@hostname.com:~/path
# delete non-empty directory
rm -rf <dirname>
# unzip zip file in current dir
unzip file.zip -d .
# add symlinks to php.ini to every subfolder of current dir
find -type d -exec ln -s $PWD/php.ini {}/php.ini \;
# | | | | |
# 1 2 3 4 5
#
# 1 walks a file hierarchy, option -d walks only dirs
# 2 at each step, execute following utility program
# 3 ln creates a linked file, option -s means create a symlink
# 4 $PWD holds the absolute pathname of the current working directory
# 5 to be understood...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment