Thursday, February 21, 2013

How to cut and paste something in Linux, using the terminal?

Q. How do I go about cutting something in one directory and placing it into another directory in the terminal?
What are the "commands" (not sure if that's what they're called) and what are their arguments? I would appreciate anyone with helpful information's assistance.

Thank-you.

A. 1) If you are talking about copying text from the terminal, you can copy with ctrl+shift+C, and paste with shift+insert (might be 'ins' on the keyboard).

2) I'm assuming that you are actually talking about moving, or copying files in your computer. Here are some basic commands;
ls - lists files in the current dictory

[john@Aaarch ~]$ ls
43375-coolarch.png 64roms Desktop
[john@Aaarch ~]$

cd - change dictory

[john@Aaarch ~]$ cd ./Desktop/
[john@Aaarch Desktop]$

cd ./ will let you change to a subdictory within the dictory you are already in. cd / will change to a dictory from the beginning of the filesystem. cd /home/john/Desktop is would be the same as cd ./Desktop, if I are already located in /home/john. To move to /home/john, my home dictory, I could also use cd ~/.
so, I could also do cd ~/Desktop, because "Desktop" is a subdictory within /home/john. If you login as another user, you will have a different home dictory, and to change to john's dictory, you will have to use cd /home/john. Home dictories are usually located in the /home dictory.

Another feature is to move up to the parent dictory with cd.
[john@Aaarch Desktop]$ cd ../
[john@Aaarch ~]$ ls
43375-coolarch.png 64roms Desktop
[john@Aaarch ~]$
Simply type cd ../

To switch to another user, you would use su. Don't worry, this will only effect the terminal use issue su on, and you can always switch back.
To switch to the root user (administrative user), you can simply type in su. You will be prompted for the password. Be very carefull when working with the root user. You can damage your system. Only use the root user when needed.

If you get lost, you can use pwd to find your location.
[john@Aaarch Desktop]$ pwd
/home/john/Desktop
[john@Aaarch Desktop]$

To copy and remove files you would use these to commands:
cp - copy
rm - remove
There is as a command to just move files (cut and paste), but I don't use it too often.
mv - move
Too copy and remove dictories, you can use the -r arguement.
cp -r
rm -r

[john@Aaarch ~]$ cp ./43375-coolarch.png ./Desktop/
[john@Aaarch ~]$ cd ./Desktop/
[john@Aaarch Desktop]$ ls
43375-coolarch.png
[john@Aaarch Desktop]$

Keep in mind that Desktop is a dictory. Dictories are usually a different color, if your terminal supports that. To get even more information of files, you can use ls -l instead.

Another useful command is man. man will let you view the manual pages of a command, if there is any availabe. Most distros come with the manual pages installed, and can be very help if learning new commands.

These are just some of the basics, but you will be using these commands as long as you use the terminal. I suggest you read some linux guides and documentation. I'll list a few that I know of, but remember that google is your friend, and also try posting on some forums as well.

http://www.linux.org/docs/
http://www.linuxhq.com/guides/LUG/guide.html (pretty old, but explains the basics)
http://learnlinux.tsf.org.za/

What is the Fastest way to teach myself EVERYTHING about computers?
Q. Without taking classes, or minimal classes, considering I have basic computer skills. How can I learn programming, web design, hacking, and other basic IT skills? What books should I read? Best answer gets the points.

A. You could study the rest of your life and you still would never know EVERYTHING about computers. I'll recommend a few books though.

Install Linux on your computer (you want to know EVERYTHING, right? That must include Linux) and get comfortable with it. I recommend Ubuntu because it's easy for beginners. Here's a link to a free ebook that will you help you get acquainted with it:
http://www.ubuntupocketguide.com/index_main.html

If you want more advanced Linux skills, I recommend Linux Command Line and Shell Scripting Bible by Richard Blum. It's pretty detailed and by the end of it you'll be good with the command line and bash scripting.

If you want to learn web design, you should learn HTML - no book recommendation here because you can just google for an HTML tutorial. It's not a programming language, it's not hard, and if you find a long book on HTML it's surely a waste of time.

You'll also want to learn Javascript, probably, for web design. I recommend Object-Oriented Javascript by Stoyan Stefanov. It's a pretty concise book and might be hard to follow if you haven't had any previous programming.

If you want to learn PHP for web development, I really can't recommend anything. I read a fabulous PHP book a few years ago, but it was on PHP 4, and PHP 5 is standard now, so I'm not going to recommend a PHP 4 book. I think PHP may be losing favor to Python though.

Everyone seems to love Python nowadays. Try Learning Python by Mark Lutz. It's 1200 pages long and rather detailed, and the author seems to assume you've had some math, but you need to learn math anyway if you're going to learn EVERYTHING about computers.

That'll keep you busy for a while. After that, you might see how impossible it really is to try to learn everything. You can learn a lot though, and sometimes it's more important to be able to find the information you need than to have things memorized.

How tech savy do you have to be to have a Linux-only computer?
Q. I don't know Unix codes, but I do know a little (Vbasic, Java, C+) programming. How long does it take to learn the proper Unix/Linux codes to properly operate and customize a Linux system?

A. Basic use of Linux is just point and click like Windows and Mac.
There are some differences in the way you do something, in Linux you download most programs through the built-in application manager. For instance in Ubuntu Linux you use Add/Remove program under the Applications menu. It would be good to learn the names of programs that do the tasks that you want to do. This site will help with that. http://linuxappfinder.com/all

Just like Windows and Mac, if you want to do advanced system functions it requires learning to use the command console.
It is much easier to learn than a programing language.
You can do much with learning a few commands and config file locations
http://www.linuxtopia.org/online_books/introduction_to_linux/linux_The_most_important_configuration_files.html
http://www.debianhelp.co.uk/commands.htm



Nec Projector Review

Plastic Shed Reviews

Ati Graphic Reviews

Nurse Uniforms Reviews

Cabochons Reviews

Inflatable Water Slides Reviews

Barcode Scanner Reviews

No comments:

Post a Comment