LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   manipulating files (https://www.linuxquestions.org/questions/linux-newbie-8/manipulating-files-380999/)

tableyou 11-08-2005 01:29 AM

manipulating files
 
i got a problem with copying files...and creating files....
where shld i create my files n directories?
i tried creating a folder in /tmp folder - file1 , then create a directory using mkdir folder1
after which i cd tmp
cp file1 folder1

and there was this thing called:
cp: omitting directory `file1/'

i was following step by step provided by linuxcommand.org

can anyone tell me where did i go wrong...yep thks

avatarfx 11-08-2005 01:37 AM

First things first. I recommend you to play with your files on your home folder (usually /home/your_username) because there you shouldn't have any problems with permissions and so.

Now, when creating a directory over /tmp, there might be apermissions problem, but I do not have enough information.

Try it on your home folder and let me know what happens.

tableyou 11-08-2005 01:45 AM

im using mandriva does not have home folder
i tried creating a folder at the same place with my Desktop/ tmp/ folders
but still cant.
yea

Wim Sturkenboom 11-08-2005 02:11 AM

Quote:

Originally posted by tableyou
im using mandriva does not have home folder
I doubt that (but OK, not familiar with Mandriva).

Let's find out:
Open a terminal and type pwd and press <enter>. What does it give you?

heema 11-08-2005 02:21 AM

type :

Code:

cd
OR

Code:

cd ~
to be taken to your home directory

avatarfx 11-08-2005 02:24 AM

Mandriva have a home folder (any distro as far as I know and I have userd Mandriva before). You can also go there by using:

cd ~

The only exception is THAT YOU'RE LOGGING AS ROOT.... if that so, please create a user before you continue and use that user. Use root JUST IN CASE IS NEEDED. Logging as root is not a good practice, specially if you are learning the Linux and Unix environments.

Once you do that, then you will have a home folder.

tableyou 11-08-2005 02:26 AM

Quote:

Originally posted by Wim Sturkenboom
I doubt that (but OK, not familiar with Mandriva).

Let's find out:
Open a terminal and type pwd and press <enter>. What does it give you?


heh, it says /home,yea,im kinda new to this.=(
so wad do i do next?

avatarfx 11-08-2005 02:35 AM

It's ok, don't get dissapointed. If you found the /home folder, now type:

cd /home;ls

and this will show you the users... you should be able to see your user as a folder ok? when you find it type:

cd your_username

and there you go.... you are in your user's folder.

From here you can play adding and removing files without any danger. you can play with this:

mkdir newfolder
cd newfolder
touch hello.txt
echo "Hello World" > hello.txt
cat hello.txt
mv hello.txt welcome.txt
ls

Have fun ;) Remember that if you need any help with an specific command, just type:

man my_command

for example:

man mkdir

(use "q" to exit the manual pages)

tableyou 11-08-2005 02:38 AM

mmm okie=)
thks alot.
yep


All times are GMT -5. The time now is 03:52 AM.