LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-03-2008, 05:01 AM   #1
x837cue
LQ Newbie
 
Registered: Jun 2008
Posts: 5

Rep: Reputation: 0
Mounting a directory as a shortcut?


Hi,

I'm trying to make a shortcut to a very long directory path (the scratchbox user home directory). I would like to have a fast access to this folder from the Desktop or user directory. Is there a way to add a reference mount like this?

Thanks in advance!
 
Old 11-03-2008, 05:16 AM   #2
klearview
Member
 
Registered: Aug 2006
Location: London
Distribution: Debian, Kubuntu
Posts: 572

Rep: Reputation: 75
So are you trying to mount some media or are you trying to make a shortcut?

If it's a shortcut both KDE and Gnome provide such a functionality - right-click on a Desktop choose 'create new link' (I think in Gnome it's 'create new launcher').

From command line it's 'ln -s /path/to/that/directory Desktop'
 
Old 11-03-2008, 05:21 AM   #3
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978
It depends from which desktop manager you're using. For example in KDE you can right-click on the desktop, chose "Create New" --> "Link to location" and select the proper folder to be browsed when you click on the link icon.

In a terminal, if you want to access a particular directory without writing its path every time, you can create an alias like:
Code:
alias cloc='cd /very/long/path/to/scratch/directory/annoyed/to/type/every/time'
If you want to open a directory using the browser from the command line, you can simply issue something in the form
Code:
konqueror file:///path/to/some/dir
depending on the browser commonly used by your desktop manager (e.g. konqueror in KDE, nautilus in GNOME, and so on). You can create an alias for this, too.
 
Old 11-03-2008, 05:25 AM   #4
klearview
Member
 
Registered: Aug 2006
Location: London
Distribution: Debian, Kubuntu
Posts: 572

Rep: Reputation: 75
If it's mounting that you're after - on Linux you can mount any directory in another place by using this command (as root):

mount --bind /path/to/that/directory /path/to/new/directory.

This way data will be accessible in two different places.

For example I can create wwwdevelop folder on my Desktop and do this:

sudo mount --bind /var/www /home/<username>Desktop/wwwdevelop
 
Old 11-03-2008, 08:06 AM   #5
x837cue
LQ Newbie
 
Registered: Jun 2008
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks for the help! The symbolic link was the solution .
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a "shortcut" to a directory? technician Linux - Newbie 3 09-29-2005 02:24 PM
home directory shortcut raaste Linux - Software 2 08-10-2004 02:08 PM
My Home directory shortcut folder on my desktop doesn't work Bensoft Kill MS Linux - Software 2 11-28-2003 10:31 PM
mounting a directory box_l Linux - General 4 07-25-2003 07:39 AM
how do i remove a 'shortcut' directory? omgkthxbye Linux - General 2 11-07-2002 08:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration