LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 09-01-2017, 12:29 PM   #1
rstelle
LQ Newbie
 
Registered: Sep 2017
Posts: 1

Rep: Reputation: Disabled
Linuxzoo tutoria,I am working tutorial 1 and i am stuck on question 7. Copy the file yearfile to yearfile2. copy the file yearfile to yearf


I am new to Linux and I am working on Linuxzoo. I am on the first tutorial and I am stuck on question 7. It asks: Copy the file yearfile to yearfile2. Copy the file yearfile to yearfile3. I put "cp yearfile yearfile2" and "yearfile to yearfile3". I keep getting a fail. I feel like I need to create the files 1 and 2 first of which I have done. Itis not working for me.
 
Old 09-01-2017, 02:20 PM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,915
Blog Entries: 13

Rep: Reputation: 4948Reputation: 4948Reputation: 4948Reputation: 4948Reputation: 4948Reputation: 4948Reputation: 4948Reputation: 4948Reputation: 4948Reputation: 4948Reputation: 4948
Hi rstelle and welcome to LQ.

Where exactly does it fail?
Code:
$ cp yearfile yearfile2
That should work fine providing "yearfile" exists and the user you are has read access to that file, and you have a read-write file system so that you can write the resulting file.

Typing the actual string:
Code:
$ yearfile to yearfile3
Is not a command and should be rejected in some form, such as "command not found: yearfile"

Perhaps this will work better if you can post the content of your terminal, showing your command attempts as well as the results, and also some more information, such as a listing of the files and an indicator about the environment where you are working. And do so using [code][/code] tags to enclose it so it will appear in a code window. Here's a possible example:
Code:
$ ls -l
-rwxrwxrwx 1 username groupname 4096 Sep 1 12:24 yearfile

# Lines with # are my comments and not output or commands.  The above is a listing of a directory using 'ls -l'
# to see file names and file sizes, as well as the privileges and owner of the file
# rwxrwxrwx - means read/write/execute permissions for owner, group, world (everyone) therefore if you are
# the file owner, the first triplet of information applies to you.
# Note it can be things like r--, rw-, r-x, or even ---; which mean read-only, read-write only, read-execute only,
# or other possibilities including "no permissions"


$ whoami
<username>

# The 'whoami' command tells us what user you are


$ groups
<mygroup> admin other-group-names

# The 'groups' command tells us what groups you are a member of - you don't need to post them all,
# just confirm that you are a member of the group which the file is attached too


$ pwd
/home/<username>/sub-directory(s)

# This outputs the directory where you are located


$ df -h
Filesystem    Size   Used   Avail  Use%   Mounted on
/dev/sda2      126G   5.1G  114G   5%     /

# part of an example showing the diskspace and here /home/<username> is really on the / tree, which is only 5% used.


$ mount
/dev/sda2 on / type ext4 (rw,relatime,errors=remount-ro,data=ordered)

# Will show a lot of other stuff, both before and after the line you really care about
# The mount command shows all mounted drives, here the important part is "rw" to indicate that '/' is mounted as read-write.
# confirming that you can write to that
I know that's a lot and sorry. These commands may not all be necessary. Perhaps you typed a command, which is not a command, which was about the second point I made.

Last edited by rtmistler; 09-01-2017 at 02:23 PM.
 
Old 09-01-2017, 05:14 PM   #3
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143
Quote:
Originally Posted by rstelle View Post
I keep getting a fail.
That's not very helpful. In Linux, error messages do actually mean something...they're trying to tell you what the problem is, you need to read them. There's not a lot we can do to help if you don't tell us what the error messages are.
 
Old 09-01-2017, 08:58 PM   #4
JeremyBoden
Senior Member
 
Registered: Nov 2011
Location: London, UK
Distribution: Debian
Posts: 1,950

Rep: Reputation: 513Reputation: 513Reputation: 513Reputation: 513Reputation: 513Reputation: 513
Are you trying to use copy to get two files which are the same, apart from their names,
or are you trying to append the contents of yearfile onto the end of yearfile2?

I suggest you put a few lines of data in yearfile, with an editor, and try to produce a valid yearfile2.
 
  


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
DNS Tutorial Question 3. Linuxzoo.net mohitnarula Linux - Newbie 7 11-13-2012 04:53 AM
DNS Tutorial Question 3. Linuxzoo.net mohitnarula Fedora 1 11-12-2012 04:15 PM
[SOLVED] file copy is stuck after 4GB procfs Linux - Newbie 6 07-09-2012 02:06 AM
making a working copy of file system over ssh undeadmachine Linux - Newbie 4 10-25-2007 12:47 AM
XFree86Config File Copy Question. rvijay Linux - Newbie 2 09-20-2003 06:23 PM

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

All times are GMT -5. The time now is 05:52 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
Open Source Consulting | Domain Registration