Peterborough Linux User Group (Canada) Forum

Linux & Android => Support => Topic started by: fox on December 31, 2019, 08:28:57 AM

Title: Problem installing and running exa, an elegant "ls" substitute
Post by: fox on December 31, 2019, 08:28:57 AM
exa is a utility that gives a nicer and more complete output than the command "ls". I read about it here (https://www.linuxlinks.com/excellent-utilities-exa-replacement-ls/), and wanted to try it. Problem is that the author provides instructions for installing in Arch, not Ubuntu. I tried to follow those instructions with what I thought were the equivalent commands. I got exa installed in the folder, ~/.cargo/bin, which is what should have happened. But when I tried the export command given in the instructions (export PATH=”~/.cargo/bin:$PATH”) and then tried to run exa, it didn't recognize the program. Then, using a terminal, I went directly to its folder and ran the same command (exa -l), but again it wasn't recognized. Next I opened a new terminal and along with a .cargo/bin folder alongside. I dragged the exa icon onto the terminal, added "-l", hit return and it ran! I don't see what the difference is between clicking on the exa icon (which is executable) and dragging it into a terminal. I also don't see why the export command didn't work. And it didn't whether I added it to the bash.rc file or implemented it in the terminal and then tried the exa command.

One other thing I tried was, in a terminal, I went to the folder where exa is located and used the command "bash exa -l". The result: "exa: exa: cannot execute binary file". I'm guessing that the application the executes exa isn't bash, and that pasting the icon is implementing the correct application, whereas typing it out isn't. I know that exa was written in rust, but putting "rust" in the terminal before "exa -l" doesn't help.
Title: Re: Installing and running exa, an elegant "ls" substitute
Post by: Jason on December 31, 2019, 12:41:00 PM
Is there a support question in here? If not, it should be in Linux Applications & Android apps which I will move it to but I just want to make sure you don't have an actual question.
Title: Re: Installing and running exa, an elegant "ls" substitute
Post by: fox on December 31, 2019, 01:02:32 PM
Yes there is a support question. How to make exa operate just by typing its name in a terminal.
Title: Re: Installing and running exa, an elegant "ls" substitute
Post by: Jason on December 31, 2019, 01:37:12 PM
Okay, I'm not sure how to clean up what you've done. But I followed these steps instead (and it's easier):
Title: Re: Problem installing and running exa, an elegant "ls" substitute
Post by: fox on December 31, 2019, 01:49:08 PM
Thanks for that, Jason! The fix was even easier. I copied the executable binary exa file I had already downloaded into /usr/local/bin. So it seems that for some reason, putting it in the .cargo folder and adding a PATH command for it didn't do the trick.
Title: Re: Problem installing and running exa, an elegant "ls" substitute
Post by: Jason on December 31, 2019, 02:27:12 PM
Quote from: fox on December 31, 2019, 01:49:08 PM
Thanks for that, Jason! The fix was even easier. I copied the executable binary exa file I had already downloaded into /usr/local/bin. So it seems that for some reason, putting it in the .cargo folder and adding a PATH command for it didn't do the trick.

I have no idea what cargo is but it's easier just to put programs in the already-existing path than to modify it.