Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 03-25-2007, 05:29 PM   #1
Registered: Aug 2005
Posts: 298

Rep: Reputation: 30
copying / moving files in console

When using the terminal to copy/move files it becomes alot of work to remember the locations of files when paths become long. Is there a way to tempuarily say let R = thisfile, let c be this directory. mv r c?

Old 03-25-2007, 05:35 PM   #2
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 474Reputation: 474Reputation: 474Reputation: 474Reputation: 474
Not really since you'd still need to remember where each file is to assign them the alias. Tab completion speeds this sort of thing up for me.
Old 03-25-2007, 06:21 PM   #3
Senior Member
Registered: Apr 2005
Location: London
Distribution: Arch - Latest
Posts: 1,522

Rep: Reputation: 45
You can create variables so

mv <file> $A
etc. etc.

But like XavierP says, tab completion is great, type part of the path/filename and hit tab to complete it or see various options if several match what you have typed.
Old 03-25-2007, 10:32 PM   #4
Registered: Aug 2005
Posts: 298

Original Poster
Rep: Reputation: 30
Some computers I use, when pressing tab twice it doesn't work. Is there anyway to enable this?
Old 03-25-2007, 10:34 PM   #5
Registered: Sep 2004
Location: So Cal
Distribution: Slackware 12
Posts: 60

Rep: Reputation: 16
Or you can create a symlink (symbolic link) to the directory where a bunch of your files are.

ln -s <path to directory> <symlink name>


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
AWK script: moving, copying and renaming files uprjamaja Programming 10 12-05-2006 01:06 PM
Simple console question. Moving files. The_Messiah Linux - Newbie 3 08-17-2005 11:51 PM
Simple console question. Moving files. The_Messiah Linux - General 1 08-17-2005 08:51 PM
copying/moving stalls when moving a lot of data to a usb stick =X= Linux - Hardware 10 07-30-2004 05:29 AM
errors while copying/moving files plisken Linux - General 14 06-07-2003 05:57 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:08 AM.

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