Raspberry Pi For Dummies. Sean McManus
Чтение книги онлайн.
Читать онлайн книгу Raspberry Pi For Dummies - Sean McManus страница 26
Copying and moving files and folders
File Manager makes it easy to copy and move your files and folders, without the need for any text commands.
When you right-click a file or folder in File Manager, a menu opens that enables you to rename the file, move it to the trash, or cut or copy it. (If you’re using British English, you’ll see Move to Wastebasket instead of Move to Trash.)
If you cut a file, it is moved to wherever you choose to paste it. If you copy the file, a duplicate copy of it is placed where you paste it. You paste by going to the folder where you want the file to be stored and then right-clicking an empty space inside a folder and choosing Paste from the menu that appears. (If you copy or cut a file without pasting it, nothing happens to it.)
You can also drag files onto a folder’s icon to move them into it.
Selecting multiple files and folders
There are several ways to select more than one file at a time so that you can delete, copy, or move them all at the same time:
Hold down the Ctrl key and click each of the files in turn to add them to your selected files.
To select a group of consecutive icons (read from left to right, top to bottom), click the first icon, hold down the Shift key, and then click the last icon.
Click the mouse on the background of File Manager and hold the button down while you lasso the files you want to select.
After you’ve selected a group of files, you can drag them all into a different folder by clicking one of the selected files and dragging it into the folder. You can also right-click one of your selected files and choose to cut or copy the whole group, as shown in Figure 4-6.
LXDE File Manager, written by Hong Jen Yee / Raspberry Pi Foundation
FIGURE 4-6: Right-clicking a file in File Manager brings up a menu of options.
The Raspberry Pi Desktop supports some keyboard shortcuts that might be familiar to you from Microsoft Windows. You can use Ctrl+A to select all files and folders, Ctrl+C to copy, Ctrl+V to paste, and Ctrl+X to cut selected files and folders. It’s worth remembering, however, that Ctrl+C is used to cancel an operation on the Linux command line (see Chapter 5), so the Copy shortcut isn’t universal on your Raspberry Pi the way it is in Windows.
If you’re selecting almost all the files, it’s probably easiest to use Ctrl+A to select all and then hold down the Ctrl key and click to deselect the files you don’t want. There’s also an option on the Edit menu to invert your selection (also available with Ctrl+I), so you can select the files you don’t want and then use this option to flip your choice so that everything else is selected instead.
Creating new folders and blank files
Organizing your files in folders makes it easier to manage them. You can more easily see what files you have where, go straight to a file when you need it, and back up a group of files by copying the folder to an external storage device.
It’s easy to make a new folder. First go to the location where you want the new folder to be stored. Typically, it’s in your home folder or one of its subfolders, such as your Desktop
. Right-click a blank space in the right pane of File Manager and choose New Folder from the menu that opens. You’ll be prompted to enter a name and click OK or press Enter to confirm. If you change your mind, click Cancel instead.
You can also use the button underneath File Manager’s menu bar, as shown in Figure 4-4.
The right-click menu also has an option to create an empty file. If you want to practice creating folders and moving files around, you can create a few blank files so that you can do this safely, without worrying about moving anything you didn’t intend to.
Deleting files and folders
To delete a file or a folder, right-click it in File Manager and choose Move to Wastebasket from the menu that appears. As you see when copying files, you can hold down the Ctrl key when you click to select several files or folders at the same time, and you can click the background of the File Manager window and drag the mouse to lasso files you want to delete, too. You can also send files to the wastebasket by selecting them and then pressing the Delete key on the keyboard (usually marked Del or Delete, and not to be confused with the Backspace key).
The wastebasket is used as a temporary place to put any folders or files you plan to remove. You can find it on the desktop (refer to Figure 4-1), and double-click its icon to see what’s inside. You can empty the wastebasket, and delete any files or folders in it, by right-clicking it and choosing Empty Wastebasket.
If you put something in the wastebasket that you change your mind about, right-click its icon in the wastebasket and choose to restore it to where it was before. (This is especially useful if you’ve forgotten where it used to be!) You can also cut or copy it so that you can paste it wherever you want.
Sorting files
When you right-click an empty space in the right pane in File Manager, a menu opens with an option to change how the files there are sorted. You can sort files by name, modification time, size, or file type, in either ascending or descending order.
The detailed list view reveals more information about each file, showing a short description, its size, and when it was last modified. You can click the column headings to sort the view by the filename, description (which groups similar files), size, or modification date. If you click the column heading again, the sort order is reversed.
Exploring your Raspberry Pi
Linux has a rigorous permissions structure that governs who can access all its files and whether they have permission to modify them or run them. It’s a good thing, because it means it’s relatively difficult for you to do any real harm to your Raspberry Pi’s operating system accidentally. You’re free to use File Manager to explore all the files your operating system uses, but if you try to delete an essential file, you’ll be told you don’t have permission.
If you want to explore your system, go to your home folder, click the Up a Level button twice (refer to Figure 4-4), and then take a look in the folders there. Chapter 5 covers some of these folders in more depth.
Go to the usr
folder and the share