take ownership directory linux

C++
sudo chown -R $USER ~/.blablasudo chown -R $USER ~/.blabla
chown -R username:group directory# Using the '*' wildcard you can include all other files and dirs
# Only us as many wildcards as you have layers in you directory
sudo chown <username:username> <directory_name>/*/*
Source

Also in C++: