Posts Tagged shell
Searching for files on a Windows server from a Mac can be very slow or even fail altogether but with a bit of shell trickery it’s very quick.
The script below is 95% instructions – the payload is at the end – that’s the line of code you’ll need to adapt for your search.
# Here's a simple shell script to search the server for a file(s) who's name you know # # 1. Specify the folder you want to search # 2. Change the script to look for the file name # 3. Job done # # 1 2 3 # Open Terminal and type "cd " (with the space) at the promp. # Hit ENTER # # From the Finder drag the folder you want to search onto # the Terminal window, ENTER # (You are now "in" the folder you want to search) # # Change the script below to use your search for your file # (keep the wildcard *s and the quote marks) # NB you can add the wildcard into a search too # eg: "*Need*stack*" will find "A needle in a haystack.psd" # # Copy and paste into the Terminal window, ENTER # (The search is case insensitive) find . -iname "*Needle_in_a_haystack*" -print
git ignore dreamweaver dwsync.xml files (and other gubbins as required)
Remove any files already added form the working directory. For example:
$ git rm -f *dwsync.xml
set up your a global git ignore file
create a gitignore file in your home directory. eg:
$ printf "dwsync.xml\nThumbs.db\n" >> ~/.gitignore
using git config add this to you git prefs
$ git config --global core.excludesfile ~/.gitignore
For repos that may be worked on by multiple users you should also create this file at the root of your working directory.