HeatWare.net header image
HeatWare.net
TwitterRSSEmail
  • Home
  • Windows
    • Windows 8
    • Windows 7
    • Windows Vista
    • Windows XP
  • Linux/Unix
  • Mac
  • Mobile
    • Android
    • iOS
    • Phones (Help / Resources)
  • Software / Programming
    • Free Software
    • Programming – General
    • PHP
    • Ruby/Rails
    • Quality Assurance (QA)
    • Software – General
    • Software Help
    • Databases
  • Cool Websites
  • Other
    • Deals & Bargains
    • News
    • Video Games
    • Hardware
    • Electronics
  • About

3 comments / February 2, 2009 / sood / Linux/Unix

How to create/remove symlinks (symbolic link) in Linux

This article will show you how to create and delete symbolic links on a Linux system.  A symbolic link is basically a file that points to another file. Note that there is only 1 copy of the actual file on the hard disk, thus saving valuable hard disk space by simply creating a link to it.

Creating a Symbolic Link

To create a symbolic link, use the syntax:
ln -s [directory or file to link] [the path of the new link]

For example, to create the link (or shortcut) /logs/mongrel.log that points to the actual file /usr/local/bin/mongrel/logs/mongrel.log, use the syntax:
ln -s /usr/local/bin/mongrel/logs/mongrel.log /logs/mongrel.log
Now, each time you want to view the mongrel.log file, you do not have to navigate to the original long path, simply go to the /logs folder

Note: You must create the /logs folder prior to creating the symbolic link

Removing/Deleting a Symbolic Link

Deleting a symbolic link is the same as removing a real file or directory. Simply use the command:
rm [filename]

Note: Deleting the symbolic link does not delete the actual file, it only removes the link.

Digg This

Related Posts

  • How to create MD5 Checksums and validate a file in Linux
  • Using Linux ‘head’ command to preview a file
  • Free Linux utility to convert PDF to Text file
  • How to append string/data to a file in Linux
  • Using 'tail' to output updates/appendings to a file in Linux

Linux

3 comments… add one
  1. Bipin Bahuguna May 17, 2010, 3:09 pm

    use unlink command for remove symbolic link

    # unlink then link name

  2. durga @ unix and linux forum September 3, 2012, 4:08 am

    Thanks for providing the useful article on Removing symbolic links in linux

  3. Poopo May 27, 2014, 5:27 am

    Thank you for the useful info published on this article…

Cancel reply

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Recent Posts

  • Why You Should Consider Diving Apps
  • How to Buy a Smartphone that Fits Your Budget
  • How to Overcome Frustrating PDF Stress
  • Convert PDF to Word: Easy, Reliable and Quality Conversion
  • PDF to Excel App ­ – A New Way of Handling Tricky Documents

Recent Comments

  • Valarie Walter on Basic Troubleshooting Steps for your Cell Phone
  • John Mists on A Brief History of Android OS
  • syarif on PostgreSQL: How to reload config settings without restarting database
  • Raghu on How to SSH to a server using Ruby – Part I
  • francisco clemente on Basic Troubleshooting Steps for your Cell Phone

Tags

ACSLS Android Cell Phones Cool Software Cool Websites Databases Facebook File System Free Software G2x Galaxy S5 Hot Deals iOS iPhone ISO LG Linux Linux/Unix Mac Mobile mysql OpenStack OS X PHP Postgres PostgreSQL Printers Programming ruby Samsung Galaxy S6 Shell Smartphones Sun T-Mobile Tips Tips & Tricks Ubuntu Unix Virtualization VMWare Windows Windows 7 Windows 8 Windows Vista Windows XP

Latest Tweet

Follow @HeatwaredotNet

SP
@HeatwaredotNet

  • Why You Should Consider Diving Apps https://t.co/Is41cdUv2I #diving-apps
    about 5 years ago

All Categories

Other Links

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Copyright © 2015 — HeatWare