Page 29
50.
To find a file in the file system, use the command ‘find’. The command below searches
from the root directory looking for a file called “flaschcp”.
root@plnx_arm:~# find / -name "flashcp"
Figure 27
– Find a File
51. In the case with two executables with the same name, it might be useful to know which
one is found without explicitly spelling out the path. Command ‘which’ will tell you the path
of the executable to be run. For example, see how many copies of command ‘echo’ are
on the system and then which one is executed.
root@plnx_arm:~# find / -name "echo"
root@plnx_arm:~# which echo
Figure 28
– Which
A short list of several more useful file- and directory-oriented commands are listed below. For an
explanation of these commands, see:
https://en.wikibooks.org/wiki/Guide_to_Unix/Commands/File_System_Utilities
.
mkdir
rmdir
rm
chmod
cp
mv
less <file>