LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 04-12-2015, 09:56 PM   #1
dunnery
Member
 
Registered: May 2010
Location: East Stroudsburg
Distribution: Debian Jessie
Posts: 222

Rep: Reputation: 8
more command


hi guys, im having terminal trouble.

i have a libre word file called lintest.odt in the Documents directory (folder). I want to move it to the Libre directory (folder).

Desktop Downloads Libre Pictures Templates
Documents home Music Public Videos


from the root directory i typed cd Documents and then pwd and I got
/home/francis/Documents
i then typed ls and i got lintest.odt

I then typed mv lintest Libre and it says

mv: cannot stat ‘lintest’: No such file or directory

what am I doing wrong?

when i try to see the contents of the lintest file with more lintest
I got ~/Documents$ more lintest.odt
PK
�F^�2^L'
--More--(0%)
and then it locks up the terminal.

im obviously doing something dreadfully wrong.
 
Old 04-12-2015, 09:58 PM   #2
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,565

Rep: Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901
If you are in the Documents directory, then the Libre directory is not also in there but rather one level above. (Hint: look into using ..)
 
1 members found this post helpful.
Old 04-12-2015, 10:10 PM   #3
dunnery
Member
 
Registered: May 2010
Location: East Stroudsburg
Distribution: Debian Jessie
Posts: 222

Original Poster
Rep: Reputation: 8
ho grail, thanks for the reply. I'm following a program called linuxsurvival.com and it works perfectly on their online course. They move files from one folder to another using this..... This is from their website.

Now, let's move all of the primate files into our newly created directory.

To move a file, you just use the "mv" command. For example, to move a file called "wolves" into directory "dogs", you would type

mv wolves dogs

so I am typing mv lintest Libre

what am i missing?

this is my first serious shot at the terminal so please forgive my ignorance.
 
Old 04-12-2015, 10:11 PM   #4
Diantre
Member
 
Registered: Jun 2011
Distribution: Slackware
Posts: 515

Rep: Reputation: 224Reputation: 224Reputation: 224
Quote:
Originally Posted by dunnery View Post
i then typed ls and i got lintest.odt

I then typed mv lintest Libre and it says

mv: cannot stat ‘lintest’: No such file or directory

what am I doing wrong?
The mv command is simply telling you that it can't find a file named "lintest", because, as you mentioned previously, the file is called "lintest.odt". Just include the extension in the filename.

But if you type mv lintest.odt Libre, you'll be renaming lintest.odt to Libre, not actually moving the file to the Libre directory. Why? As grail mentioned, the Libre directory is one level above the Documents directory where you're issuing the commands, so you'll have to use "..", which means "parent directory":

Code:
$ mv lintest.odt ../Libre
Quote:
Originally Posted by dunnery View Post
when i try to see the contents of the lintest file with more lintest
I got ~/Documents$ more lintest.odt
PK
�F^�2^L'
--More--(0%)
and then it locks up the terminal.
The file you're trying to view is a binary file, certain characters are not properly displayed by the terminal, hence the lock-up. If it was a text file, more would have no trouble with it.
 
1 members found this post helpful.
Old 04-12-2015, 10:12 PM   #5
dunnery
Member
 
Registered: May 2010
Location: East Stroudsburg
Distribution: Debian Jessie
Posts: 222

Original Poster
Rep: Reputation: 8
i meant hi grail
 
Old 04-12-2015, 10:16 PM   #6
dunnery
Member
 
Registered: May 2010
Location: East Stroudsburg
Distribution: Debian Jessie
Posts: 222

Original Poster
Rep: Reputation: 8
but isnt Documents directory on the same level as the Libre directory?

Desktop Downloads Libre Pictures Templates
Documents home Music Public Videos
 
Old 04-12-2015, 10:17 PM   #7
dunnery
Member
 
Registered: May 2010
Location: East Stroudsburg
Distribution: Debian Jessie
Posts: 222

Original Poster
Rep: Reputation: 8
why doesnt the linux terminal course tell me to write it like that? or am i once again gloriously dumb as a brick!!!!!!
 
Old 04-12-2015, 10:21 PM   #8
Diantre
Member
 
Registered: Jun 2011
Distribution: Slackware
Posts: 515

Rep: Reputation: 224Reputation: 224Reputation: 224
Quote:
Originally Posted by dunnery View Post
but isnt Documents directory on the same level as the Libre directory?
It is, but once you're "inside" Documents, then Libre is one level above.

Code:
~
 | Documents
   ---> lintest.odt (you're here)
 | Libre
 
1 members found this post helpful.
Old 04-12-2015, 10:22 PM   #9
dunnery
Member
 
Registered: May 2010
Location: East Stroudsburg
Distribution: Debian Jessie
Posts: 222

Original Poster
Rep: Reputation: 8
oooohhhhhh i get it now
brilliant. very cool. thank you guys
 
Old 04-12-2015, 10:34 PM   #10
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,565

Rep: Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901
The other alternative was to not cd into the Documents directory, then it would be of a similar format to what you were doing:
Code:
mv Documents/lintest.odt Libre
Please remember to mark as SOLVED once you have a 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
cygwin simple tar command fails when issues on command line deannad Linux - General 1 06-12-2013 11:22 AM
Command/Script required to send an email alert in case command will not respond rajaniyer123 Linux - General 1 05-19-2012 02:12 PM
Executing shell command from JSP file with command line arg from URL orcusomega Programming 2 01-13-2012 04:38 PM
Bash Command Line Editor, while typing run another command before executing current? gumaheru Linux - General 5 04-13-2010 12:21 PM
URGENT! Is there any command to get a history command lines and time in SUSE Linux.? igsoper Linux - Software 5 06-25-2009 03:14 AM

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

All times are GMT -5. The time now is 12:15 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