Creating symbolic links rather than copying

This drove me nuts for more than a short time, but if you’re interested in creating a whole bunch of symbolic links at any time, simply use the -s switch to the cp command – i.e.:

cp -s /media/MoreVideos/*.avi /media/Videos

would create a symlink in Videos to each .avi in MoreVideos.

Niiice.

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s