Hardware Reference
In-Depth Information
FIGURE 2-5 Using the ls command to show a list of the iles and directories on
my Raspberry Pi
Figure 2-5 shows that inside /home/pi are six directories listed in blue (such as Desktop
and Scratch), as well as one ile in pink ( ocr_pi.png ) and one in red ( minecraft-pi-
0.1.1.tar.gz ). his list does not really tell us much about those iles or directories. To
learn more about the contents of the directory you are in, type ls -l . You are still using the
ls command, but this time adding the -l (which stands for long ) parameter or option.
his tells your Raspberry Pi to show the list in a longer, more detailed format:
pi@raspberrypi ~ $ ls -l
Parameters modify the way that the standard command works (a bit like ticking
a tick box in a GUI program). Most Linux commands have lots of parameters that
modify the way that they work. Just to be clear: the -l parameter is a lowercase
L, not the numeral 1.
As you can see in Figure 2-6, the Raspberry Pi will now give you more information
about the iles and directories that were listed in Figure 2-5. his information includes
the size of the ile, the date it was created, the owner of the ile and what kind of per-
mission you have to access it.
To move between directories or folders in the tree-like structure, you can use the cd
( c hange d irectory ) command. Try moving into the Desktop directory by typing cd
Desktop at the prompt:
pi@raspberrypi ~ $ cd Desktop
To move between directories or folders in the tree-like structure, you can use the cd
( c hange d irectory ) command. Try moving into the Desktop directory by typing cd
Desktop at the prompt:
pi@raspberrypi ~ $ cd Desktop
Search WWH ::




Custom Search