This is Alan Pope with the fourteenth screencast in the
Ubuntu Month of Screencasts.
All the screencasts in this month can be downloaded from our website,
which is screencasts.ubuntu.com
In this screencast we are going to look at the Nautilus file browser,
and managing files and folders on your Ubuntu desktop.
So first of all we will go to our home folder.
Now within the Nautilus browser we have a couple of toolbars
along the top of the window.
We'll go through these in just a moment.
And the screen is split and you have a pane on the left with a tree view,
this is configurable, we'll see that a bit later as well
and on the right hand side we have our files and folders.
There are a number of standard folders you get delivered with Ubuntu.
You can of course create additional folders
and manage your files and folders by dragging and dropping
and all the usual methods.
If we dive in to a folder here, this one called documents,
you see the tree view on the left expands up.
And along the top of the window,
you can see it says the folder that we're in is Documents.
You can also use these little arrows to navigate around.
On this toolbar you can see we are in the documents folder,
which is within the screencasts folder.
The screencasts folder is my home directory,
the user I'm using is called screencasts.
So there you can see the home folder.
You can also see a button that takes you to the home folder.
The little icon of a house represents the home folder.
You can toggle this toolbar to the show the location in text form
or in button.
And you can see here it shows the full location, the full path
to the folder that we are currently looking at,
which is /home/screencasts/documents.
You can use the buttons on the toolbar to navigate around.
to go up one level in the directory tree.
to go backwards and to refresh what's in that browser window.
Down the bottom we have some details about how much is in this folder
and how much free space there is as well.
We can quickly go to home by clicking the home folder.
and ticking the computer button takes us to a view of
the devices within our system.
These devices could be external devices or they might be disks.
We can also press the search button to locate files.
So I just type in a search term here on the toolbar
and it shows the results directly in the window I'm currently using.
Again we go back to home.
And on the left-hand side you can see we have number of options
for what's shown in the left hand pane.
If I change this to Places instead of Tree,
you'll see the display changes and it shows a set of shortcuts.
These are the major places on your system.
including your desktop itself, your home directory, CD-ROM drive and so on.
And a bit lower down you can see some shortcuts to some commonly used folders,
If I change this left pane to show Information,
you can see it shows a large icon
and gets larger if you expand that view
and shows some details about the folder that you are currently looking at.
So we are currently in my home directory,
called screencasts and it shows a bit of information about that folder.
There's also a History view, which shows all the folders I've looked at so far.
So you can see here I looked at documents, then computer,
then did a search and then came back home again.
You can also annotate folders with notes.
So here I can just type in some free text,
which might be useful for describing a folder.
Sometimes the name is not enough, you might want to put
a more verbose description of what the folder contains.
And you'll see this little yellow icon to show that this folder
has a note attached.
There are also graphical emblems.
So rather than putting a piece of text on a folder,
you could grab an icon that depicts what that folder might be used for.
You can see there's a lot of delivered icons
that you can just grab hold of and drag over to a folder
and it puts a little icon on the folder.
Now you can't see it too well, if I zoom in you might be able to see it a bit better.
In some of the other views we'll see later,
it'll show up a bit, be a bit easier to see.
Let's go back to Places now.
You'll notice down the bottom of the Places menu, a number of shortcuts.
We'll configure some of those a little bit later on.
Now there's some more configuration options if you go to the Edit menu,
which is preferences.
You see the File Management Preferences dialog appears.
And in here we have some options for the default view,
So this is what you get when you open Nautilus
and by default we are viewing as icons,
but we could view as a list.
You can see with a list view we get more information.
We get information about the size, type
and the date that each item in the folder was modified.
And here on the Preference pane you can choose what is the default
when you open up the Nautilus file browser.
You can also choose how to arrange the files.
So by default it's by name, so alphabetically.
You might choose to sort them by a different method,
for example the largest items at the top of the list
or the most recently modified at the top of the list.
You can also choose to sort folders before files,
so all the folders are grouped together at the top of the list
and then all the files appear below.
You can change the arrangement of course,
just by choosing the drop down in the Preferences dialog.
You can also choose to show hidden and backup files.
Now hidden files, under Ubuntu are... well they're hidden by default.
It's similar to using this option under the View menu, which is Show Hidden Files.
Now you'll see a lot of files have appeared, whereas they were previously hidden
and the thing they all have in common is they all start with a full stop,
they all have a dot at the beginning of their name.
So that's how you make a file hidden, on Ubuntu,
is just prefix it with a full stop.
Usually these are used for configuration or
other folders that are used by the system that you generally don't need to look at.
So we generally hide them, but of course you can show them if you want to.
There's a default zoom level, so you can have the icons appearing much larger.
or if you want, you can have them appearing smaller.
If you have a lot of folders for example, you might want to shrink the zoom level down
so that you can get more on the screen.
And again in the preferences dialog you can change the default.
There's also a compact layout, which squashes together the icons
and doesn't space them out quite so regularly.
Again that's useful if you have lots of folders or files that you want to see at once.
You can also chose to place the text description of an icon
of a file or folder next to it or below.
And that's just toggled with that tick box.
So basically you can play around with these settings
until you get something that you feel is right for you.
Down the bottom of the Preferences window,
there's an option for the zoom level if you're in the list view.
So there's two separate zooms, one for icon view and one for list view.
And of course you can override the default settings
using the little magnifying glass icons as I just showed you.
There's also an option in the preferences dialog to show only folders,
so you can see here in the examples folder there are lots of files.
But if we turn on Show only folders, then they disappear.
So you can use the tree view to just view folders
and then look at the files on the right-hand side of the window.
But of course that is configurable,
if you want to show the files on the left-hand side as well in the tree view, you can do.
Okay let's look at the next tab in Preferences, the Behavior.
Now this first option is what happens when you single or double-click a file.
If you change this behavior, then you can single-click on a folder
or a file to open it, or navigate into it.
The default is to double-click.
So some people prefer to use single-clicking,
So there I can single click on a file and it opens up.
others prefer to double-click.
you just choose whichever is your preference.
If you have it in double-click mode,
then single-clicking just highlights the item.
Whereas in single-click mode, hovering over the item highlights it.
This option here, Always open in browser windows,
if you turn that off, then when you open a nautilus window,
you no longer get the pane on the left-hand side,
the Tree or Places view, it's no longer there.
If you turn it back on again, then when you open Nautilus windows,
it comes back.
So if you want to have a compact view of your windows,
you could turn that tick box off,
so you don't get the tree view.
and you have a nice compact window.
Very good if you've got a low resolution display
or lots of files and folders to show.
The next section is for text files.
Now text files can be plain text files that you could open and edit
or they might be scripts, programs that you could run.
and these options determine how you deal with those text files
when you double-click on them
or single-click on them if you have that set as your option.
Down the bottom we have, how do we deal with deleting items.
So the first option is Ask before emptying the Deleted Items folder.
So what I'll do is I'll just do edit copy and paste
to create a copy of the videos folder.
And if I just press the delete key on the keyboard, it deletes the folder,
but it actually sends it to the Deleted Items folder or Trash
or Recycle Bin, you may see it called.
And we can empty the Deleted Items folder
by right-clicking the the little dustbin, the trashcan in the corner of the screen
and choosing Empty.
And this will empty out those files, so I can no longer recover them.
I can then reclaim that space on my disk.
Let's do that again, but this time I'll copy and paste the Videos folder.
to make a duplicate, just for us to test.
And I'll delete it again, but this time I'll turn off Ask before empty.
And now when I choose Empty Deleted Items, it just empties it.
It doesn't ask me for any confirmation.
So it's just a simple level of protection you might want,
in case you accidentally choose to empty the Deleted Items folder.
You can also move things to the Deleted Items folder by right-clicking.
I just you the delete button on the keyboard usually.
You can see there, you can also press Ctrl+T, to send something to the trash.
Another option here is to include a delete command,
you now see an extra option on the menu for deleting an item.
and that permanently deletes an item, which you can do with shift+delete.
That will send a file into oblivion, it won't go to the trash can,
it won't go to the recycler, it will just disappear.
So here is what happens if I do a shift+delete,
which is the equivalent of doing a delete and bypassing the trash can.
So now the trash can has no items in it,
because I have deleted it completely.
Moving on, the Display tab gives us more configuration options
for how we display files and folders.
You can see here, if I zoom in, we get a bit of extra information,
the number of items within a folder is shown.
And if I zoom in even further,
you'll see more information is displayed.
The date and time that the folder was last modified
and in the File Management Preferences dialog, on the right,
you can see where we configure what gets shown when you zoom in.
So you can determine that you want to see what type of file or folder it is,
when you zoom in or the owner of the file, when you zoom in.
So this allows you to have a bit more configuration
of how you view the extra data about files and folders,
when you zoom in.
This information is only really visible when the items are zoomed in,
so that there's enough room for that information to be displayed.
If we zoom back out again, you can see the information disappears.
You can also set the format of the date that gets displayed.
When you are using the list view, you get a default set of columns,
name, size, type and date modified.
You can add additional columns using this view,
I've added the owner column,
so now we can see who owns each of the files in my home directory.
We can now see the date that those files were last accessed and so on and so on.
So you can add as many as you need and that will fit on your screen.
And if they don't fit on your screen, then you get a scroll bar
and you'll have to scroll across or re-size the columns to make them fit.
You can also move the columns around,
So if I highlight a column and press move up,
you can see on the left-hand side,
it's moved that column across to the left-hand side
and move down will move it across to the right-hand side.
You can see all the changes I'm making are taking effect pretty much straight away.
The final tab in the File Management Preferences dialog
is to do with how Nautilus deals with previewing files
Now if we go to the Examples folder,
you'll see there are lots of different file types in here.
And you can see it actually previews the contents of some of these files.
Let's create an example,
if I right-click an empty space and do create document,
I'll create an empty file.
I'll just call it my_document.
This is just an example to show how the preview works.
And if I double-click on it,
it's going to open the text editor.
I'll just put a bit of text in here that says Hello World!
And then close and save this.
Now what you'll see is when I switch to the icon view,
you can see the actual contents of the document, Hello World!
gets displayed as a preview for that file.
So you can see there it says Show text in icons for local files only.
That means if a file is on a remote server
or on a shared folder, it won't show them
or I can choose Never show.
And the reason you might want to tune this or change this setting
is from a performance point of view.
If you have a lot of files it might take a while for it to read the contents of the files
and show those preview icons.
And so by switching that off to never or for local files only,
you might improve performance.
So there are lots of options here see for other preview-able files,
I can choose never or local files only, again.
And I can choose the threshold, the size at which I want it to
decide whether to show a preview or not.
So only files smaller than a certain size,
so that it's not having to open lots of large files in order to read them
to provide a preview of those files.
So as you can see here, as I change the value of files,
various files within the left-hand side become preview or not.
Then we have another option for sound files,
We've got a couple of sound files here, .ogg audio files.
Now my sound system here is muted at the moment,
but if we had the sound audio turned up,
then I could hover over those audio files and we'd get a preview sound.
You actually here a snatch of the music.
The final option down here is the folder count,
where it determines how many files are in the folder,
so that you can see which folders have most items in them.
And you can again configure this to improve performance,
you could choose only local files or never show the size of the folders.
Okay, so that's a little about Nautilus and configuring the preferences for Nautilus.
If we go back to our home directory again,
make this a bit bigger,
You can see up here the path here /home/screencasts.
If I press the up arrow it's going to go up one from screencasts into the /home directory.
You can see here a number of folders, these are other people's home directories.
So mine's the one in the middle with the little house icon
and the other folders are other people's home directories.
And if I go up again, we find ourselves at the very top level
of all the files on the system.
Now I'm not going to go into detail about what each of these folders contain,
But you generally don't touch anything in any of these folders at all.
There are some special folders, such as proc and dev,
which get some dynamically generated data in.
But most of the others contain critical system files.
Such as bin contains some critical programs,
boot contains some programs to do with booting the system up,
lib contains libraries,
sbin contains some system administration programs and so on and so on.
So all the ones that I've just highlighted,
and all I did there was hold down the the Ctrl key and tap each of the folders in turn.
and each one of those folders contains critical stuff
that generally we don't touch.
The only area that you might touch is possibly the temp directory, tmp
and your own home directory.
An administrator might make changes to files elsewhere,
But generally an end user will only touch files in their own home directory
or other shared directories.
And these are the files I have in my home directory.
In a later screencast we'll talk more about the other files on the system.
But for now we are just looking at managing files within our home directory.
You can of course create your own folders.
So here I've got a folder that I am creating.
You can use spaces, you can use underscores,
various permitted characters within the name of your folder.
And Nautilus will tell you if you try and use characters that are not allowed.
I can drag files around, in order to organize my files.
And of course I can delete, rename and all the other usual things,
that you would want to do to manipulate files.
So I can highlight a file and just press delete
and it goes in to the Deleted Items folder.
If I accidentally deleted it and I want to get it back,
then all I do is drag it back out of the Deleted Items folder, the trash.
So if I grab hold of this and drag it back into another folder
it takes it out of the Deleted Items and puts it back into my work folder.
I can also create a shortcut on the desktop,
What I'm doing here is dragging the icon over the desktop
and holding down Ctrl and Shift
and it creates a little shortcut on the desktop.
So this is a link to this file.
And if I make changes to the file that's on the desktop,
because this is actually just a link to the original file in my work directory,
if I then refresh the desktop to update the icon,
you will see the text within there has changed.
It's probably nigh on impossible for you to see,
but the preview text has changed.
Now here's a neat thing we can do is stretch the icon
you can make the icon bigger.
As a bigger target to hit on my desktop, here we go.
You might want to use the resizing to indicate importance
or relevance of icons on your desktop.
And you can restore icons to their original size as well.
All I did there was right-click to get the context menu,
and then choose to re-size the icon.
Of course I can delete the link from my desktop
and the original file is still in place.
So all I've done there is get rid of the link,
so you can see the original file still exists in my work folder.
All I did was get rid of the link from my desktop.
Okay, let's move on to another topic.
Now my work folder, I might use on a regular basis.
So what I could do is create a bookmark,
a kind of shortcut to my work folder.
You can see the bookmarks listed in the bookmark menu,
is the same as the places listed on the left-hand side of this window.
And if I navigate in to my work folder and just go to the bookmarks menu
and choose add bookmark, it appears in the Places menu.
So now you can see my work folder listed in the bookmarks list.
And this is useful because it means I have quick access to folders
that might be somewhere buried deep within my home directory.
It also shows up under the Places menu at the top of the screen
and also if you're in an application, let's open text editor.
and I create a new file.
When I click the save option,
by default it's wanting to save this new file in my home directory.
But if I hit this button to say browse other folders,
we now get the option of going straight to my work folder.
So it's a great way of having a direct link to somewhere
that you use regularly, that you want to save files.
There we go.
So now it's just saved directly in to my work folder
which I accessed as a bookmark.
There we go.
You can create as many of these bookmarks as you like,
some of them are delivered already
and you can keep dragging things into the
area on the left-hand side, the Places pane.
And you'll notice under the Places menu, now
all of my bookmarks have been aggregated together.
and put under a sub-menu.
So that the Places menu doesn't grow too large,
we now have a sub-menu of Bookmarks
Okay, let's take a look at managing files on an external device.
Here's a USB key, I've just plugged in to my laptop.
You can see it flash initially to detect the device
and it flashes again when the system mounts the disk.
You can see here it mounts the disk at this level in the directory tree,
/media/disk.
That's the default location where one of these new media sticks,
assuming it's been formatted already, will be mounted.
We also get an icon on the desktop, of the same name, disk.
If we added a second one it would be called disk1, disk2, disk3.
Now if I pull it out,
you'll notice a message in the bottom right-hand corner of the screen
saying Unsafe device removal.
It's generally recommended that you unmount a device before you unplug it
or eject the device before you unplug it,
rather than just pulling the device out.
So let's do that again, but do it the right way.
So this time I'll plug the device back in again
And again it detects the device, then mounts the file system
that's on that device, again under /media/disk.
And you can see my files that exist on that device
and the icon on the desktop
and the icon listed in the Places menu as well.
And this works for USB keys, some media players, MP3 players
and also external hard disks.
Now I'm going to make a change,
I'm going to select a file that's on the USB key and delete it,
You can see there's a bit of activity on the USB key as that folder is deleted.
And now what I'll do is I'll right-click the icon on the desktop,
and choose to unmount the volume.
and this flushes out any changes and ensures that the data is consistent
on my USB key and and then disconnects from it.
But before it does that it gives me the option of what to do with
the things that are in the waste basket.
I deleted the folder foo and it's asking me,
Do you want to empty the recycle bin
or not empty the recycle bin?
Now that I've unmounted the device,
I can unplug it and everything is okay.
Let's do the same thing again, but this time instead of using a USB key,
I'll use a USB memory card reader.
And I've got a memory card that came out of my digital camera.
and I took three photos on the digital camera,
so they should be on this memory card.
Now you'll notice nothing has happened on the desktop yet,
when I plugged the media card reader in.
It's only once you actually plug the card in that anything happens.
Now a pop-up box has appeared because it has detected
that this is a device that may have photos on it.
It's come out of my digital camera, so that's probably a good guess.
Now managing digital photos is a topic we'll cover in a later screencast.
So I'm going to ignore this for now and just treat that device as piece of storage.
So if I go to /media/EOS_Digital, which is where it mounts the device.
Notice it's not using the name disk,
but EOS_DIGITAL, I'll talk more about that in a minute.
And I can navigate around on the device.
And there you can see the photos that I took earlier on.
and of course I could copy those files off there manually.
There are also photo management tools in Ubuntu,
which again we'll cover in another screencasts,
that I could use to import those photos and manage those photos.
And again when I've finished, I just right-click the icon on the desktop
and then choose unmount
Once it's unmounted I can then unplug the device
Just like that.
So that's a little bit about mounting external devices.
And it works much the same for mounting CD-ROMs and DVD-ROMs as well.
We'll talk more about that in another screencast.
Now there's a page on the Ubuntu documentation that I wanted to show you.
My USB key was mounted under /media/disk,
that's where I could find it in the directory tree.
My memory card from my digital camera was mounted under a different location.
and that's because it had a different label.
Now a label is name you can put on to the device itself
to influence where it gets mounted on your system.
That helps you to identify which device it is you are looking at.
If you have three or four keys plugged in, you might want to give them different names.
And this page, which I'll include on the site,
a link to details how to go about doing that.
It's a little bit advanced, so I'm not going to show it right now.
but if you want to do that, you can.
Okay, finally we'll talk about something on the context menu
If you right-click a folder, there's a couple of options near the bottom,
which are quite useful, Create Archive and Send to.
Now Create Archive is a very useful utility for creating a compressed file,
that may contain multiple other files.
You see here it supports various different file formats including gzip and bzip
and the more common on the windows platform is the zip file format.
So by right-clicking a folder and choosing Create Archive,
I can then give the archive a name and choose where I want it to be located.
Hit Create and it adds all the files that were in that folder in to an archive
So I've now got an archive called Examples.zip
and that contains all the files that were in my Examples folder.
This might be useful if you want to collect up a bunch of files
and maybe send them to someone.
Another way to do this is to do right-click -> Send to
And when you do Send to, you get the option of sending
the contents of that folder as an email.
So I can type in the name of someone or someone's email address in fact.
And it will attach the contents of that folder,
compressed as in this case a zip file.
When you hit Send, it compresses the files up, attaches them to an email
and then gives you the opportunity of typing a subject
and type in the body of the email, before it actually sends the email.
You can do the same thing if you've already compressed a file.
If you've already compressed a file or folder,
you do right-click -> Send to
and then just type in the email address of the person you want to send it to.
And you get the option here of compressing the file,
but as this file is already compressed, there's no point me compressing it again.
So I'll turn that off and just click send.
Again your email client opens and you get
the opportunity to add some text and then send it.
So that's Create Archive and Send to, very useful.
So that's an overview of Nautilus
and some of the main features of the Nautilus file browser.
There are plenty more screencasts at our website,
screencasts.ubuntu.com