Shows The "Present Working Directory"
Shows The "Present Working Directory"
From digitalb0y
Filesystem Layout:
/home personal User data similar to /Users on windows
/etc all your configuration files
/var system logging /mail /print spooling.
/bin core user binary programs (used to booting system)
/sbin core Super User binary programs (used to booting system)
/usr/bin User binary programs
/usr/sbin - Super User binary programs
/opt/ - Third party software
Special directories
/dev -Device files of system hardware.
/proc Special files on containing information about system resources.
Navigation the shell prompt
pwd -
cd
change directory
import
lbxproxy
listres
lndir
makedepend
makeg
mergelib
mkdirhier
mkfontdir
mkxauth
mogrify
xfwp
xg3
xgal
xgammon
xgc
xgetfile
xgopher
xhexagons
xhost
xieperf
xinit
RunWM
RunWM.AfterStep
RunWM.Fvwm95
RunWM.MWM
montage
mtv
mtvp
nxterm
xiterm
xjewel
xkbbell
xkbcomp
4. While Linux supports long file names which may contain embedded spaces and punctuation characters,
limit the punctuation characters to period, dash, and underscore. Most importantly, do not embed
spaces in file names. If you want to represent spaces between words in a file name, use underscore
characters. You will thank yourself later.
Looking Around
Now that you know how to move from working directory to working directory, we're going to take a tour of your
Linux system and, along the way, learn some things about what makes it tick. But before we begin, I have to teach
you some tools that will come in handy during our adventure. These are:
ls
The ls command is used to list the contents of a directory. It is probably the most commonly used Linux
command. It can be used in a number of different ways. Here are some the switches
-l
-R
-r
-S
-s
Display the number of file system blocks actually used by each file,
in units of 512 bytes, where partial units are rounded up to the
next integer value. If the output is to a terminal, a total sum for
all the file sizes is output on a line before the listing. The
environment variable BLOCKSIZE overrides the unit size of 512 bytes.
-T
-t
-u
-U
-v
-W
-w
-rw-------
1 bshotts
bshotts
drwxr-xr-x
6 bshotts
bshotts
-rw-rw-r--
1 bshotts
bshotts
-rw-------
1 bshotts
bshotts
----------
-------
-------
576 Apr 17
1024 Oct
1998 weather.txt
1999 web_page
1998 xmas_file.txt
File Name
+---
+-------------
+-----------------------
Group
+--------------------------------
Owner
Modification Time
|
+----------------------------------------------
File Permissions
File Name
The name of the file or directory.
Modification Time
The last time the file was modified. If the last modification occurred more than six months in the past, the
date and year are displayed. Otherwise, the time of day is shown.
Size
The size of the file in bytes.
Group
The name of the group that has file permissions in addition to the file's owner.
Owner
The name of the user who owns the file.
File Permissions
A representation of the file's access permissions. The first character is the type of file. A "-" indicates a
regular (ordinary) file. A "d" indicates a directory. The second set of three characters represent the read,
write, and execution rights of the file's owner. The next three represent the rights of the file's group, and the
final three represent the rights granted to everybody else.
more
More is a program that lets you view text files This is very handy since many of the files used to control and
configure Linux are human readable.
more filename
less
less is like more. However ever to does additional things, so less is more :).
Controlling less
Once started, less will display the text file one page at a time. You may use the Page Up and Page Down keys to
move through the text file. To exit less, type "q". Here are some commands that less will accept:
Manipulating Files
This lesson will introduce you to the following commands:
man
Standard Output
Most command line programs that display their results do so by sending their results to a facility called standard
output. By default, standard output directs its contents to the display. To redirect standard output to a file, the ">"
character is used like this:
ls > file.txt
Now lets view the file using less
less file.txt
All man pages have a common format. They begin with name (the name of the command) and a brief
description of what it does. For example the pwd command shows the following:
NAME
pwd -- return working directory name
SYNOPSIS
pwd [-L | -P]
DESCRIPTION
The pwd utility writes the absolute pathname of the current working directory to the standard
output.
Next comes synopsis, which shows the command any any options, or flags, that you can use with it.
For pwd, there are two options: -Land -P. These options are explained in the description section:
s you can see here, each of the two options is explained, and a final sentence tells you that the command
assumes that the -Loption is desired if no other option (and theres only one) is specified.
As you work from the command line, youll find that reading up on the options available for different
commands is really important. Youll learn the myriad ways you can use these tools, and some manpages
also contain examples to help you understand them.
There are MAN files for just about every program you can find.
Next Up Package Management:
Some parts
Ref http://linuxcommand.org/