Welcome to YLOAN.COM
yloan.com » Linux » Linux Command
Games Personal-Tech Data Entry registry cruise torrent mac code virus storage uninstaller systems cisco bugs wireless codes maintenance dell update communication trojan atlanta Data Backup Data Storage Data Protection Data Recovery Anti-Virus Windows Linux Software Hardware Mobil-Computing Certification-Tests Computers & Internet Internet

Linux Command

In the Linux command line shell, moving around from directory to directory

, adding new directories, and deleting old directories is easy once you know the proper commands. Again, with Linux, you are limited only by your brain! If you know all the commands, then you weild great power. But if you know only a few commands, it's like you are standing in the airport in Tokyo and want to know where the bathroom is, but only know how to say hi and bye in Japanese.

If you want to move a file from one place to another, use the mv, or move command. Now, the mv tool can send a file from one directory to another, but it also can rename a file. If you simply want to change the name of a file, say, from joo.txt to joe.txt, you can do that with mv also. Here are a few examples to get you going.

mv joe joe1

The file joe is simply renamed joe1


mv joe /Documents/joe

The file joe is moved to the Documents directory.

Now, what if we wanted to move joe.txt to the Documents directory and at the same time rename it to joe2?

mv joe Documents/joe2

This would move the file joe to the Documents directory and would change the name to joe2. This is similar to cp, but the original file is changed. With cp we get a new file and the original file is unchanged.

If you'd like to see the contents of a file, use the cat command. cat stands for concatenate. cat will display the contents of a file and also join, or concatenate several files.

cat joe

This command will output the contents of joe.

What if you'd like to view the contents of two or more files?

cat joe bob

Will output the contents of joe and then bob.

Ok. Now let's play around with cat and two new commands: touch and echo.

Do this:

touch jj.txt

Which will create new text file called jj.txt.

echo "Hi there" >> jj.txt

This adds the text "Hi there!" to jj.txt.

You can append some more text to the end of jj.txt with another echo command and two greater than signs ">>" like this:

echo "How are you?" >> jj.txt

Now take a look at the contents of jj.txt via:

cat jj.txt

One thing to know when using cat, if you use only one greater than sign ">", it will overwrite the contents of the file. Be careful!

Let's overwrite jj.txt on purpose.

echo "See you later." > jj.txt

Now view the contents via cat:


cat jj.txt

... and you should see only the "See you later." line.

I hope this helped you become a little more familiar with the Linux command line. Have fun and experiment. Remember, while playing around, it's best to create a new directory and make new files specifically to experiment with so you don't lose any important data. Soon you'll be using the command line like a pro!

by: sachinjarvis
When I Put My Ramones Band Hat and My T-Shirt On Anti-cancer Agents Found In Red Wine Grapes Uninstall/Remove Red Cross Antivirus - How To Perform A Removal Of The Red Cross Antivirus Virus From Your PC Who Contends You Can't Avail Yourself Of Boisterous Red Crib Bedding In Your Tot's Room? Satellite Direct Linux Watch Boardwalk Empire Season 1 Episode 1 Pilot Online Free Streaming Hard Hat Decals: A Different Approach to Promote Your business Guidelines to Ensure Linux Server Security SEO Techniques - White Hat SEO versus Black Hat SEO Buy The Awesome Nokia 6700 Slide Red On Contract Deals Small Red Riding Hood Costume - Obtain One Today! El Piloto Amv Toni Elías Completa Una Gran Remontada En Motorland Aragón El Piloto Amv Arrasa En Las Arenas
print
www.yloan.com guest:  register | login | search IP(3.21.106.4) / Processed in 0.008219 second(s), 7 queries , Gzip enabled , discuz 5.5 through PHP 8.3.9 , debug code: 64 , 3035, 12,
Linux Command