Linux tips

Here is few tricks for Linuch which we needed during our exploration of this system 😉

How to change executable flag for scripts recursively

find -iname '*.sh' | xargs chmod 777

How to configure shared library path

Add file atomix.conf to directory /etc/ld.so.conf.d. To this file enter following:

# atomix libraries
/home/USER_NAME/dev/SharedLibraries/libs

and then run

sudo ldconfig

External link: http://www.yolinux.com/TUTORIALS/LibraryArchives-StaticAndDynamic.html

VIM cheat sheet

External link: http://www.tuxfiles.org/linuxhelp/vimcheat.html

How to resize partition

Use gparted

sudo apt-get install gparted

Measure disk write speed

time sh -c "dd if=/dev/zero of=ddfile bs=8k count=100000 && sync"

How to configure MacOs for Qt programming.

How to configure script for automatic run after login

Create startup-script(or any other)file in your home directory. Then enter following command

nano startup-script
chmod 777 ./startup-script
sudo defaults write com.apple.loginwindow LoginHook /Users/thomas/.startup-script

Another solution is to create .bash_profile file, which is launched automatically by system.

or create

How to configure new search path

If you want to have bin folder in your home directory, enter following code snippet to your .profile file located in your home directory:

export PATH=$PATH:/Users/user_name/bin

Open file using:

nano ./.profile

Note:Path is separated by char “:”.

How to instal apt-get alternative for MacOS

Mac OS have apt-get alternative called “port“.

Additional notes

Realtek RTL81xx macOs version:

How to mount Windows drive from MacOs

As first, create some directory where you want to mount your shared drive

mkdir mnt
cd mnt
mkdir computer_d
mount -t smbfs //user_name:[email protected]/d computer_d

Conclusion & Note

It’s possible that all of these task can be done in simpler way, or can’t be done at all. All comments and tips are based on my current experience with my first MacOS configuration in my life 😉