Friday, 29 June 2012

10 Nautilus tips and tricks

Nautilus is the file manager for Gnome. Gnome is a GUI for many Linux distributions and it is my favourite so far.

A file manager is the program that manages and lets you access your files. In plain words, it is the window with folders and stuff in it. Knowing how to use it properly can let you save a lot of time (unless you want to use the terminal, which could be even faster), so here is a list of a few tips and tricks to improve your file managing experience!

You can open a new window from terminal (if you have Gnome) with the command:

nautilus &

1. Change default "Open with" program for an extension

A quite common problem is the one of changing the default program with which a file is opened. If you have a Windows background, you'll endlessly search in the "Open with" from the right-click menu, but you will not find the answer there. Fortunately, the solution is easy:

-   Right-click on file with interested extension
-   Click on "Properties" at the bottom of the menu
-   Go on the "Open with" tab
-   Select wanted application and click on "Set as default"

Now the application you selected will be used by default as main application to open the files with the same extension with a double-click.


2. Multiple Panes in one window

Sometimes we want to move files from one folder to another and it would be convenient to have both folders somehow open in the same window to ease the transfer. This is possible!
In a window, just press the F3 button and a new pane will appear (initially with the same folder showing to both frames). You can switch from a pane to another just clicking on the wanted frame.


3. Select items matching a pattern

If you want to select multiple files with a certain name only or, say, with the same extension, there is an easier way rather than doing that manually!

Press Ctrl+S in a window and a dialog will open asking for the pattern. You can use the power of wildcards in this window!

The wildcards you can use are * and ?. Their working is very simple. Whenever the find program sees a *, it substitutes any random string in it. Basically, if you type just: * . It means everything.
For the ? wildcard, instead, it will replace only one character. Then, typing ????? will match any string containing 5 letters or numbers, including the extension.

It should be now clear how powerful can it be using wildcards for selecting files. I will provide a few examples:

*.jpg
Will select every file with extension .jpg, i.e. every image in a folder.
*2012*.jpg
This, instead, will select every picture in the folder containing 2012 in its name (note that *2012.jpg will only look for pictures having 2012 at the end of the filename, and viceversa for 2012*.jpg).
*.*
This will select all files (while * would also select folders).
???.*
This will select any file that contains 3 characters, such as lol.jpg or asd.txt.


4. Move, Copy, Link

You can use the click-and-drag options also present in Windows under Nautilus:

-   If you click and drag files without pressing any additional key, it will chose what to do depending on the destination. It will move files if the destination is local (same hard disk) and copy if the destination is not on the same File System (external drive).
-   If you click and drag pressing the Ctrl key, it will copy the files in any case.
-   If you click and drag pressing the Shift key, it will move the files in any case.
-   If you click and drag pressing both the Ctrl and Shift key, it will create a (soft) link to the files.


5. Move windows from anywhere

For users with low resolution screen, it may happen that some windows have the title bar (to move it) outside the borders of the screen.
This is quite annoying and it may be even impossible to close it, as the X button is hidden.
In order to move the Window, though, you can keep pressed the Alt key and left-click anywhere inside the window to move it!


6. Resize windows from anywhere

Similar to the previous one, but press Alt and middle-click with your mouse to resize the window without having to hunt for the border!


7. Run common scripts with one click

Nautilus has a default script folder in which you can put your bash scripts and run them by just selecting them (e.g. a script to remove files older than a certain date, or a script to clean the name of the selected files... you can really use your imagination here).

This is extremely useful and you can either download bash scripts or make your own. You just need to right-click and then select the "Scripts" menu, then the script which you want to run. You may find the script folder empty, initially.

In order to add your scripts to the list, you need to put your scripts in the scripts folder for nautilus. You can open it clicking on "Open scripts folder" from the same "Scripts" menu, but it is usually located in ~/.gnome2/nautilus-scripts


8. Quickly check number and size of multiple files

If you need to quickly know how big is a collection of files, it will be necessary to select them and check the bottom right corner of the folder. The number of the files selected, together with their total size is displayed in a pop-up balloon.


9. Keyboard shortcuts

This is a list of shortcuts to quickly perform the underlined actions. For some of them (e.g. Rename) you need to highlight a file first.

Rename: F2
Create new folder: Shift+Ctrl+N

Cut: Ctrl+X
Copy: Ctrl+C
Paste: Ctrl+V
Select All: Ctrl+A
Invert Selection: Shift+Ctrl+I

Add to Bookmarks: Ctrl+D
Search for Files: Ctrl+F

Move to Parent folder: Alt+↑
Move to Selected folder: Alt+↓
Move back: Alt+←
Move forward: Alt+→


10. Gnome 3 window tricks

This tricks will work only with Gnome 3.

Expand window: you can double-click on the title-bar to expand a window in any Gnome, but with Gnome 3 you can drag the title bar and push the window to the top to automatically expand it.

Divide screen between two windows: drag the window from the title bar and push it to the left (or right) to expand the window to half the size of the screen.

Open the activities: without clicking, push your mouse to the top right corner. This will open the "Activities menu".



No comments:

Post a Comment