[ubuntu-za] MOVING A FILE USING MV?

Adrianna Pinska adrianna.pinska at gmail.com
Fri May 29 15:21:34 BST 2009


Hi, Vincent

One of the other replies has probably already sorted you out, but
here's a more general explanation of how to navigate around your
filesystem in a terminal:

* You can type 'pwd' to figure out where in the filesystem you are,
and 'ls' to see what is there.
* When you launch a new terminal, you will probably be in your home
directory: /home/yourname.  This directory has a special alias: ~ (it
only works for you; for another logged-in user it would refer to
*their* home directory)
* Stuff which appears on your desktop is in the Desktop directory
inside your home directory, so you should be able to get to it by
typing 'cd ~/Desktop'
* The alias for your current directory is . (this may not seem very
useful, but sometimes you need it)
* The alias for one directory up is .. (so cd .. takes you up a directory)
* The root directory of your entire filesystem is /
* When you pass file or directory names to a command like mv, cd, cp
or ls, they must either be relative to your current location or
absolute paths (full paths from the top directory or from your home
dir).  So if you have a file on your desktop and you are in your home
directory you can refer to it as Desktop/yourfile, ~/Desktop/yourfile
or /home/yourname/desktop/yourfile.  The last two paths are absolute
-- they will work no matter where you are.
* The shell in your terminal has tab completion -- you should only
need to type the first few letters of a filename; when you press tab
it will be completed automatically (you may need to type some more if
multiple files start with the same letters).
* The shell also understands wildcards: for example, 'mv Desktop/*.jpg
Pictures/' would move all the files ending in .jpg from your desktop
to the Pictures directory (assuming you were in your home dir).  This
is the first taste of the true power of the shell -- instead of
dragging bunches of files around you can type one line.  :)

Happy mving,
Adrianna

-- 
~ Registered Linux User #334504 ~
"If ignorance is bliss, then knock the smile off my face."



More information about the ubuntu-za mailing list