Using the command line in linux – part 2
This is part two in a series of “how to use the command line in linux” style articles…. these are intended to be quite basic for those that have not used a command line before…. In part one we logged in (if necessary) and found out about the help command, navigated a bit with the arrows and exit -ed from our login. This time we’ll try to learn a bit more about dealing with files and navigating. In a graphical interface, if you browse files, you’re presented with a list of files and folders for a directory that you can scroll through and read at your leisure. In the command line we have to tell the computer to list the files and folders for the directory that we’re currently “in” to list those in linux, we use the ls command….
When you log in under linux and open a command shell, you are usually put in your “home directory” (/home/username/)
$ls
10-23-05-username.xpm dead.letter Documents/ potatohead122804.tuberling music.raw tmp/
9-20-05-.xpm Desktop/ Download/ Music/ Pictures/ Video/
So…. let’s see, items with / after them are directories, everything else we see is a file.
how should we move to a folder to look? we need to “change directories” don’t we? cd is the command to use…
cd Documents (remember linux is case sensitive…) and press enter…
now ls
document.txt
there are some handy shortcuts too… to move “up” a directory type cd .. and we move “up” in the hierarchy (through nested folders) by one folder. We could also go directly to a folder by specifying it “explicitly” “cd /home/avery/Documents/web” for instance would take me to that folder no matter where I currently have the console open to.
If you get lost, you might type “pwd” to see the “present working directory”
Popularity: 1% [?]
Related Posts - Scheduling tasks in linux - the at command I did an article a while back about cron and scheduling tasks in linux (I also mentioned kron which is a graphical interface for cron scheduling...). That works well and good for things that happen on a recurring basis, but the next question is what if I want to schedule......
- Recovering a Split BiggieFile from a MondoRescue Backup Once upon a time I wrote of manually extracting a file from a mondorescue backup. Sometimes it's just easier to do that, than have mondorescue go through 30 some cds or dvds just to find one file. (Not to mention the fact that the iso's aren't burned to disc but......
- Rsync for easy (and quick) backups I've got to say, I haven't spent ENOUGH time with rsync to really be fluent in how I could put it to use.... A week or so ago I was reading this list of essential Linux software by a guy that moved from Mac OS X to linux because he......
Related Websites - Creating A Custom 404 Error Page Every web surfer has encountered the dreaded 404 page not found error message. The generic error page is horrible to look at and it does not encourage web visitors to explore more of your site. Imagine being able to setup a custom error message page that looked good, told the......
- HOWTO set up a home filing system In my last post I covered the basics of a filing system. That’s just one part of the story. You still need to pick and stick to a filing technique. I’ve been using a system for sometime now and it’s been working out pretty well. No more paper clutter. The......
- Goodbye TDAmeritrade, Hello Izone! I just closed down my account with TDAmeritrade. I transferred everything to Izone.com. Funnily enough, Izone is owned by TDAmeritrade and offers EVERYTHING that my regular TDAmeritrade account offered. Infact, the user-interface is identical. Its so identical, that the new username and password I created at izone.com even works at......
Similar Posts
- Simple Backup
- Using the command line in linux – part 1
- Using the command line in linux – part 4
- Using the command line in linux – part 3
- Another workaround for WMF exploit