DEV Community

rahuldev-17
rahuldev-17

Posted on

Miscellaneous Tips

How to get vim to use another vimrc file

Vim will use the ~/.vimrc by default. If you wish to specify another initialization script, just do:

vim -u <PATH TO FILE>

Where is my .vimrc file?

:echo $VIM
:echo $MYVIMRC

OSError - Errno 13 Permission denied

run id in the terminal to get your user_id and group_id

Go the directory/partition where you are facing the challenge. Open terminal, type id then press enter. This will show you your user_id and group_id

then type
chown -R user-id:group-id .

Replace user-id and group-id

. at the end indicates current partition / repository

chown -R 1001:1001 .
(that was my case)

How do I run .sh scripts?

Give execute permission to your script:

chmod +x /path/to/yourscript.sh

And to run your script:

/path/to/yourscript.sh
Since . refers to the current directory: if yourscript.sh is in the current directory, you can simplify this to:

./yourscript.sh

check file size

ls -sh

stat file

Top comments (0)