Wednesday 29 November 2017

Unix / Mac - Rename folder, Make a copy of folder


  • Below command renames folder from folder-name-old to folder-name-new ( deletes folder-name-old )


$ mv        folder-name-old     folder-name-new


  • Below command copies a folder to another folder ( keeps both folders)


$ cp  folder-name-old     folder-name-new

Unix / Mac - find files




  • Below command shows all the files which contains letter 'a' in file name, inside a folder recursively

$  find . -name *a*.jar -printf "%p %k KB\n"


  • Find files last modified in the last 40 minutes

$  find . -mmin -40

Friday 24 March 2017

How to show hidden files in mac

How to show hidden files in mac

  • Open Terminal and run below command.
$ defaults write com.apple.finder AppleShowAllFiles YES

  • Close All Finder applications

$ killall Finder

  • Reopen Finder