finding specific file in command-line - command-line

So I recently downloaded Beautiful Soup and is you'll see in the beginning of the documentation, I need to find the README.txt file to get more info on bs4 beta documentaion.
I looked in and around the directory bs4 is in, but it's not there, so I need to find the file.
I am using grep right now, but I ran grep in the command line 20 minutes ago and I still have nothing. This is what I did:
grep --include README.txt -l 'Beautiful Soup'
Is there something wrong with my code, or is this just an extremely slow method? If it's wrong what is right? if it's just slow, what would be faster?
note: I have a mac running OSX Mountain Lion. So my command-line is terminal

you should look for README.txt with find:
find . -name 'README.txt'
the "." means that you're searching recursively in the current directory. Replace it with the folder where you want to search
a note: your shell is "bash", that's the default shell in os x terminal and most unix systems

Related

Flutter command not found and PATH is confusing

I can't use the Flutter command without it saying zsh: command not found: flutter so I can't create a flutter project which is obviously a necessity.
I have installed Flutter by following the instructions on the site. I set the $PATH how it said to in the docs as well, the first time. I removed flutter from the terminal and reinstalled it but I may have made the situation worse.
Here's what I've done so far:
Put the Flutter SDK in my root folder, I know where it is so that is how I set my $PATH in my .zshrc file export PATH="$PATH:/Users/kentwilson/flutter/bin"
I have run echo $PATH | tr ":" "\n" and this is the result:
/usr/bin
/bin
/usr/sbin
/sbin
/usr/local/bin
/Applications/mongodb-macos-x86_64-4.2.0/bin
/usr/local/share/dotnet
~/.dotnet/tools
Users/kentwilson/Development/flutter/bin
~/flutter/bin
The second from the bottom is from when I had the Flutter installed before.
This is where I am falling apart. I am illiterate when it comes to my computer environment. Everything else I've ever installed required no effort and I miss that.
Decade old MacBook Pro, Catalina 10.15.7 macOS. I know I'm running zsh, I know where the .zshrc is. I have the powerlevel10k installed. Here are my user config lines:
source $ZSH/oh-my-zsh.sh
# User configuration
export MANPATH="/usr/local/man:$MANPATH"
export PATH="$PATH:/Users/kentwilson/flutter/bin"
I've tried it with the double quotes and without. I've tried to find other places that might have a PATH somewhere. Nothing. I've googled a few times and when others simply set the PATH and it fixed the issue but not for me.
Aside from these things, I know nothing. Help me. Thanks.
(Optional)
Find where ~/flutter/bin is added to the PATH and delete the line.
Find where Users/kentwilson/Development/flutter/bin is and delete the line.
You should be able to grep -nr "flutter/bin" * 2> /dev/null from home directory. It might take a while.
(Recommended)
Install FVM https://fvm.app/docs/getting_started/installation
Add following lines to .zshrc
# Flutter
FLUTTER_HOME=$HOME/.fvm/flutter_sdk/
export PATH="$FLUTTER_HOME/bin/cache/dart-sdk:$PATH"
export PATH="$HOME/.pub-cache/bin:$PATH"
export PATH="$HOME/fvm/default/bin:$PATH"
There is a GUI as well for fvm named SideKick which handles multiple flutter versions/channels super easy.

Mac OS: How do you fix a PATH to reach an executable file (in this case postgresql & netlify-cli) without messing up other paths?

In the mac terminal:
Does anyone know how to set the path variables for a Mac OS, without messing up other paths?
Current folder structure:
/
/Applications
/[a lot of applications]
/Postgres.app
/Contents
/Versions
/12
/bin
/psql
/Users
/userName
/Applications
/[nothing, except a couple hidden files]
Right now, if I run the command psql, I am getting:
command not found
If I type the full path:
/Applications/Postgres.app/Contents/Versions/12/bin/psql
it works, but typing this every time is not practical.
If I run git that command is available, or code .
Also, I installed netlify-cli globally with npm install -g netlify-cli, but when I run netlify-cli, I get:
command not found
and I don’t know where to find it in my system
… So, something is working correctly with my paths, and something is not. I don’t know how to fix the problem, without messing up other paths.
Does anyone know how I could find out where netlify-cli got installed and fix my paths to netlify-cli and psql without messing up any other paths?
For Mac OS to be able to find the psql executable, it has to be part of the PATH environment variable, you can check the value of that variable on your terminal with this command
echo $PATH
what you should do is add the psql executable to it, like this:
export PATH=/Applications/Postgres.app/Contents/Versions/12/bin/:$PATH
if that solves your problem, you can put that on your .zshrc or .bashrc to make it persistent

How do I get eshell working correctly in emacs?

For some reason, when I type in commands I'm used to on linux, it works perfectly, as it does in bash... But in eshell, it doesn't work.
I've narrowed the problem to a trivial and small sample, as follows:
$ du
c:/Program: command not found
$ which bash
c:/Program Files (x86)/Git/bin/bash.exe
How do I get this working? (du is whatever it is by default... It's implemented in elisp, I haven't made any unusual changes there, that is, it's a compiled lisp function in `em-unix.el')
I would've expected something along the lines of "You have used 1.3 GiB of disk space", rather than that command not found error.
It doesn't use bash.exe, but it can use du.exe, when present.
On my system:
c: gutov $ which bash.exe
which: no bash.exe in ...
c: gutov $ which du.exe
h:/Apps/System/gnuwin32/bin/du.exe
From your error message I can tell that it calls some command and fails because it doesn't properly quote the path to executable (which contains spaces). Maybe you should do M-x report-emacs-bug.
Overall, I recommend:
1) Uninstall Git and reinstall it selecting the second option when asked about your PATH environment ("Run Git from the Windows Command Prompt"). This will remove the unix tools packaged with it from PATH.
2) Install in some directory without spaces and add to PATH unix tools from GnuWin32 project, or from Eli Zaretski's ports. The latter contains fewer packages overall, but it has a much faster find, for example. You can mix them.
Alternatively, maybe you can get away with just reinstalling Git into directory without spaces.

How to open Eclipse -- tegra development pack -- in ubuntu

After i installed "tegra development pack" on my ubuntu, the installation opened eclipse IDE for me and then i closed and then figured out that there isn't any shortcut or anything i could launch it from.
Update:
I followed "Venzen" solution till step 3 and used the filtering command. That showed me that there is another folder named "NVPACK" is located in username > NVPACK > eclipse which I didn't know about, I kept locking tipping in "eclipse" in the terminal.
Also, there is something stupid I did I would like to share; what happened here is that I kept looking at NVPACK installation folder at windows files not in linux files. (I'm using ubuntu in windows).
You could open a terminal and try to launch Eclipse from the command line:
$ eclipse
If this does not work it could mean that the eclipse binary was installed somewhere outside of your PATH and you will have to look for it. I am not familiar with Tegra, but here is a general purpose "process of elimination" to find a file in *nix:
update the locate database
$ sudo updatedb
use the which command to interrogate the updated locate database
$ which eclipse
you should have found it by now. If you haven't all is not lost - run the locate command just for good measure
$ sudo locate eclipse
locate could potentially output lots of matches since it outputs any match to your search term whether its a file or a folder. If the output of locate scrolls off the screen then use grep to filter out only matches where eclipse is a file:
$ sudo locate eclipse | grep '.*eclipse$'
If this produces several matches then choose the eclipse file which resides in a bin folder.
If, by now, a file called eclipse has not yet shown itself, then there are 2 more options left - a long way and a short way...
use the find command
post the method (or source) from where you installed
either way, kindly post here should steps 1-3 above not reveal eclipse.

finding files on android os

There is no utilites like find, grep , "ls -laR" to find files in Android os. IS there a way or is there a list of current default files in the os file system hierarchy?
Make a local copy of the files using adb pull /system system; adb pull /data data and use your favorite tools to search on your development machine. Or you can install BusyBox on the emulator, which gives you something intermediate between the extremely limited built-in command line and a full unix command line.