Need up to 30 seconds to load.
there are some basic commands that can
make finding files and commands and
Linux a lot easier for example we wanted
to know where the LS command was located
we can say where is and it'll tell us
the location of all commands with LS if
we just want to know which file is going
to be run if we type in LS we can use
which LS and this tells us that if we
just type in LS and execute it that
we're actually running the program in
the bin directory LS command if you're
not sure where a file is you can use
locate so if we say locate LS we're
going to get a lot of output because
we're listing any file or path that has
LS inside of it so if you're looking for
a particular command the where and which
are probably better alternatives but if
you're looking for a file locate is
often a good way to do this we list the
contents of this directory let's look
for a file dot txt notice we did not
find it but we did find another file
that has file dot txt in the name locate
uses a database or you might sing a file
index to look up the locations of files
we can update this with update dB
if you're not pseudo on some systems you
may get an error so we can either sue to
the root account or use sudo to gain
privileges sometimes when you use sudo
it may ask you for your past
now that we've run update dB
let's locate file dot txt again and now
it finds the file