Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

In my Ubuntu, I have added some frequented directories to the bookmarks of Nautilus, for visiting them quicker.

Nautilus can consume a lot of memory, when it has been kept open for long and there have been many tabs opened in it. Nautilus can also close itself unexpectedly, and makes me lose track of what dirs I was working with. So I am thinking about some alternatives to Nautilus (both GUI and CLI are fine).

I guess that command line is the simplest option. But I will miss the bookmark convenience of Nautilus.

  1. What are some good practices/ways to remember and organize frequented dirs?
  2. What I have thought is to create a dir, and store links to frequented dirs there. Are there better ways?
  3. Is it possible to convert the dir bookmarks in Nautilus to links?
  4. I am looking for where the dir bookmarks of Nautilus are stored, but to no avail:

    $ find ~ -name nautilus | less
    
    ./.config/nautilus
    ./.gconf/apps/nautilus
    ./.gconf/apps/ubuntuone/nautilus
    ./.gnome2/accels/nautilus
    

    I checked the above locations, and content of the files there, but didn't find anything for bookmarks.

share|improve this question

4 Answers 4

Command Line Tools

I use autojump myself and I also depend on many aliases for navigating at the command line, e.g.:

alias b='cd -'
alias c='cd ~/Dropbox/95_2014/work/code'
alias d='~/Dropbox'
alias lnk='cd ~/Dropnot/webs/rails_apps/linker'
alias n='cd ~/Dropnot'
alias play='cd ~/play/'
alias q='cd ~/Dropbox/95_2014/work/code/ruby__rails/ruby/ruby_quiz'
alias s='cd ~/Dropnot/setups'
alias w='cd ~/Dropnot/webs'
alias work='cd ~/Dropbox/95_2014/work'

I keep these and all my other aliases in a ~/.bash_aliases file and include it with

test -f ~/.bash_aliases && . $_

in my .bashrc file.

For my autojump installation I have this line in my .bashrc

test -s ~/.autojump/etc/profile.d/autojump.sh && . $_

which maintains the portability of my .bashrc dot file as it allows me to have that line even on a new machine without autojump installed without error.

Organization

For the actual organization, I use:

~/Dropbox               # stuff for the future / elsewhere, maintained by Dropbox
~/Dropnot               # stuff for git, not Dropbox, i.e. sites and apps
~/Dropbox/95_2014       # My 'year' approach to archiving old stuff every year
~/Dropbox/95_2014/work  # All my work stuff which is most of it.
~/Dropbox/95_2014/life  # All my non-work, personal and private stuff

I also use:

~/tmp # as a scratchpad directory for files I don't care about.

~/setups # for a cloned github repo with my dotfiles.

and the folllowing system directories

~/Downloads
~/Desktop
~/Pictures

for quick usage, e.g. screenshots, downloads, etc.

Other tools:

I've also set autocd which allow you to type a directory name and be cd'd into it if it exists (ok in Ubuntu but in OSX I had to upgrade my bash version from 3 to 4. The line that invokes it is:

[ ${BASH_VERSINFO[0]} -ge 4 ] && shopt -s autocd

I also find it helpful to have directory info in my PS1 prompt to show me the top three (current) directories and the bottom two, plus time, name machine and git branch, as in

enter image description here

which I achieve by having the following in my .bashrc

git_branch () { git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'; }
HOST='\033[02;36m\]\h'; HOST=' '$HOST
TIME='\033[01;31m\]\t \033[01;32m\]'
LOCATION=' \033[01;34m\]`pwd | sed "s#\(/[^/]\{1,\}/[^/]\{1,\}/[^/]\{1,\}/\).*\(/[^/]\{1,\}/[^/]\{1,\}\)/\{0,1\}#\1_\2#g"`'
BRANCH=' \033[00;33m\]$(git_branch)\[\033[00m\]\n\$ '
PS1=$TIME$USER$HOST$LOCATION$BRANCH

Note the carriage return so that the long PS1 prompt doesn't push the cursor way over to the right.

Bookmarks from Nautilus

I like these in nautilus but avoid accessing or using them at the command line. I don't want to have to deal with the syncing issue that might involve; I use OSX (as well as Ubuntu) and it wouldn't be of use there; the above strategy of aliases at the command line serves me better; I only like 6-12 bookmarks in the gui side panel anyway so that's not hard to just create on the fly (<1 minute one-time task).

share|improve this answer
    
I could swear ive seen those .dot lines elsewhere... –  mikeserv Jul 27 at 9:11
    
(IFS=/ ;set -- ${PWD%"${last=${PWD##/*/}}"}; printf "${1+%c/}" "$@"; printf "$last > ") - I think that's what you're doing with sed in $LOCATION, and that does it using only builtins. My preference is to declare functions and call them rather than variables - they're far more useful. Still, I wish I could upvote this post twice. Have a look here if you're curious about the function thing. –  mikeserv Jul 27 at 18:05

Personally, I have never understood the use of fully-fledged file managers. I deeply prefer to use coreutils for file management. As a result, my solution for this would be to suggest a directory management utility. There are a myriad of these, and I have never personally found a use for them so I can make no personal recommendation. But, below are a few examples that you could explore:

  • autojump
  • j and j2
  • z - based on j
  • v - “z for vim”
  • fasd - based on autojump, z and v

It's readily apparent that many of these utilities are designed by the same person (namely, j, j2, z and v). But, I imagine all of them have enough differences to justify the different projects.

I guess this means my primary recommendation to you is actually coreutils. It may not seem like it's much of an alternative; but in actuality all file managers are actually just alternatives to coreutils.

However, since you are welcoming all alternatives to Nautilus, I will add one more terminal-based alternative (TUI, though; curses interfaces ftw!): mc. Midnight Commander (or mc) is a terminal-based visual file management solution. Personally, I swear by coreutils, but I know many people that do the same for mc.

My final recommendation is deeply rooted in my being an Archer—“Try it and see” [which one you prefer]! Use that one!

share|improve this answer
1  
Suggesting autojump seems to deserve a +1, even though I never used it. It might take some time to get used to it, but it looks like the kind of tool you just can't live without once you discovered it. –  John WH Smith Jul 27 at 0:55
    
@JohnWHSmith, thanks for the +1. If you have any additions to this list of directory managers, please let me know and I will add them! –  HalosGhost Jul 27 at 0:56

As for a GUI solution I use and suggest Thunar (it's of course available for other desktops too). It's fast, lightweight and stable, it's memory footprint is almost unnoticeable (~70 MiB on 30+ tabs on two separate windows). Some of its features include:

  • Tab navigation.
  • Drag/drop Bookmarks.
  • Select files by pattern (Ctrl+S).
  • Batch file and directory renaming (F2).
  • Support to browse FTP, Samba, MTP and other fuse or gvfs-based volumes.
  • Built-in volume manager.
  • Built-in network shares browser.
  • The ability to add custom context-menu items: run a custom script/command on certain files or directories.
  • Run a terminal emulator on the current directory, two clicks away.

Among other interesting features.

Update:

Thunar stores its bookmars in ~/.gtk-bookmarks which makes them available for other gtk-based apps in a URI format as shown below:

file:///home/ariel/Descargas
file:///home/ariel/Documentos
file:///home/ariel/Im%C3%A1genes
file:///home/ariel/M%C3%BAsica
file:///home/ariel/Plantillas
file:///home/ariel/P%C3%BAblico
file:///home/ariel/V%C3%ADdeos
smb://sx2310/publico/ SMB /publico/ en SX2310

I don't know if Nautilus already stores them in such format, but if it does, there's no need to even import them into Thunar.

Update #2:

It looks like Nautilus actually stores its bookmarks in the same format, as stated in this question; but on a different file (~/.config/gtk-3.0/bookmarks), so it'd only be a matter of copy-pasting them:

cp -f ~/.config/gtk-3.0/bookmarks ~/.gtk-bookmarks

You can even merge them (Natilus to Thunar):

cat ~/.config/gtk-3.0/bookmarks >> ~/.gtk-bookmarks

And vice versa (Thunar to Nautilus):

cat ~/.gtk-bookmarks >> ~/.config/gtk-3.0/bookmarks

Update #3:

It should work fine under the Gnome desktop, even though it was designed for XFCE, because XFCE itself relies on many Gnome libraries. And I can confirm it does based on personal experience.

share|improve this answer
1  
thanks. (1) Which is more stable and lightweight, Thunar or Nautilus? Thunar is defined for a different desktop than Gnome. I am concerned if it will be lightweight and stable on my Ubuntu and Gnome. (2) possible to migrate the dir bookmarks in Nautilus to Thunar? –  Tim Jul 27 at 2:09
    
Based on personal experince: both are stable, but Thunar is less prone to memory leaks and waste than nautilus. XFCE is based on many GNOME libraries, so compatibility shouldn't be an issue, I've tested it under GNOME, XFCE and LXDE and it works great on them all (I first tried thunar on GNOME and it worked so great, I switched completely to XFCE). For the bookmarks part, see my updated answer. –  arielnmz Jul 27 at 2:12

Are you familiar with Vim? If yes, then have a look at Ranger. It's a very fast text-based file manager, and uses Vim-like shortcuts.

  1. Move around with hjkl.
  2. To bookmark current directory, press m, then the key to store the bookmark under. To access the bookmark, press ', then the key you bookmarked it under.
  3. To create a directory simply type :mkdir DIR_NAME
  4. To access the shell, simply press S, and go back to ranger with Ctrl+D.

For list of keybindings type 1?. Also see https://wiki.archlinux.org/index.php/Ranger .

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.