LoginSignup
1
1

More than 5 years have passed since last update.

隠しファイルも含めフォルダ内のファイル全コピー Mac

Posted at

隠しファイルまでGUIでコピペ出来なかったので。bash_profileにエイリアスとして書いてしまいます。

bash_profileを開く

vi ~/.bash_profile

bash_profile内に実装する

function cp_all(){ 

cp -a $1/. $2

}

bash_profileを更新する

source ~/.bash_profile

引数1と2に、それぞれコピー元と、コピー先のパスを指定すればok

$ cp_all /Users/god/Desktop/aa /Users/god/Desktop/bb

これで .env のような隠しファイルも全部一緒にコピーされる。

ps

ちなみに、下記のようにしておく mk とか md とかできるので便利。

function mk(){
vi ~/.bash_profile
}

function md(){
source ~/.bash_profile
}
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1