Buy the ARP T-Shirt! BIOS Optimization Guide Money Savers!
 

 10 September 2005
 N/A
  N/A
 Guides
 djspinnet
 1.0
 Discuss here !
 64134
 
   
Desktop Graphics Card Comparison Guide Rev. 33.0
Covering 628 desktop graphics cards, this comprehensive comparison allows you ... Read here
BIOS Option Of The Week - Virtualization Technology
Since 1999, we have been developing the BIOS Optimization Guide, affectionately known... Read here
   
Buy The BOG Book Subscribe To The BOG! Latest Money Savers!
ARP's Linux Noob Guide
Digg! Reddit!Add to Reddit | Bookmark this article:

I Wanna List My Files!

If you have some experience with MS-DOS, then you'll be very familiar with the "dir" command, which is used to list files in your current directory.

The Linux equivalent is "ls", which stands for 'list'. Typing "ls" will display all non-hidden, non-system files and sub-directories within the current directory.

Of course, it also supports some 'switches' to display more information about the directory's files. Common switches include :

-l which shows file permissions and ownership
-a which shows all files in directory, including hidden files
-F which shows what kind of file it is, eg, a directory, executable, symlink, etc...

You can add any of the switches to the 'ls' command, or combine multiple switches. For example, typing "ls -alF" in a directory would list all the files in the directory, including hidden files, as well as show their permissions, ownership and file type. You will get a list that looks something like the following :

ariadne:~ jinny$ ls -alF
total 152
drwxr-xr-x 27 jinny jinny 918 Aug 24 17:15 ./
drwxrwxr-t 5 root admin 170 Aug 13 15:36 ../
-rw------- 1 jinny jinny 4003 Aug 24 12:03 .bash_history
drwxr-xr-x 3 jinny jinny 102 Aug 13 17:35 .netbeans/
-rw-r--r-- 1 jinny jinny 519 Aug 24 12:03 .profile
-rw------- 1 jinny jinny 5625 Aug 24 12:03 .viminfo
drwxr-xr-x 19 jinny jinny 646 Aug 23 18:49 Apps/
drwx------ 22 jinny jinny 748 Aug 24 17:19 Documents/
drwx------ 20 jinny jinny 748 Aug 24 17:19 public_html/

 

Viewing The Contents Of Your File

If you want to quickly view the contents of a text file, there are several methods you can use.

The first is that furry feline - "cat". Typing "cat <filename>" will display the entire contents of a text file. This is similar to how the "type" command works in DOS.

There are two other utilities available for displaying text files. The first is "more" (which is slightly 'more' enhanced than 'cat'). The second is "less" (which is actually even better, and was so named because 'less is more' - it's true, really!). Both of these programs are used in the same way as cat.

For example, to view the contents of the file 'meows' , you just type 'cat meows' and the contents of the file will be displayed on your terminal.



 

 
   
The ASUS Eee Box B204 & B206
GoldenMars 1GB GeeDom GU-P05 USB Flash Drive Review
XGI Volari 8300 Graphics Card Review
NVIDIA nForce4 SLI XE and nForce4 Ultra Technology Report
Jetart 3D Slot Fan Review
Jetart Xpanel DT5000 Multi-Purpose Display Panel Review
Complete GeCube / GigaCube Radeon 9600 Pro/XT Voltage Modding Guide
Definitive Review of the Zalman ZM80A-HP GPU Cooler
1COOLPC Video-1-120 Cooler Review
Everglide Gaming Pad Review

 


Copyright © Tech ARP.com. All rights reserved.