RVM Tips

Uninstall RVM


rvm implode 

or

rm -rf ~/.rvm

List all .rvmrc contents and save it to a file.


I had to list .rvmrc contents for a lot of rails projects. Instead of doing it manually, here is the power of unix commands solving that problem.

Step 1

List all directories.

ls -l | cut -c 47-

Grab the string from character position 47 to the end of the string

Step 2

For each directory
a) cd to that directory
a) cat .rvmrc
b) append output to rvm.txt file

Solution

ls -l | cut -c 47- | xargs -I {} cat {}/.rvmrc

To sort and save only unique entries:

ls -l | cut -c 47- | xargs -I {} cat {}/.rvmrc | sort | uniq > rvmrc.txt


Related Articles

rvm


Ace the Technical Interview

  • Easily find the gaps in your knowledge
  • Get customized lessons based on where you are
  • Take consistent action everyday
  • Builtin accountability to keep you on track
  • You will solve bigger problems over time
  • Get the job of your dreams

Take the 30 Day Coding Skills Challenge

Gain confidence to attend the interview

No spam ever. Unsubscribe anytime.