Red Hat NETSCAPE MANAGEMENT SYSTEM 6.0 - COMMAND-LINE Manuale Utente Pagina 45

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 60
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 44
45
ls
List the content of the current directory. Under Linux, the command "dir" is an alias to ls. Many
users have "ls" to be an alias to "ls --color".
ls -al |more
List the content of the current directory, all files (also those starting with a dot), and in a long
form. Pipe the output through the "more" command, so that the display pauses after each
screenful.
cd directory
Change directory. Using "cd" without the directory name will take you to your home directory.
"cd -" will take you to your previous directory and is a convenient way to toggle between two
directories. "cd .." will take you one directory up.
cp source destination
Copy files. E.g., cp /home/stan/existing_file_name . will copy a file to my current
working directory. Use the "-r" option (for recursive) to copy the contents of whole directories,
e.g. , cp -r my_existing/dir/ ~ will copy a subdirectory under my current working
directory to my home directory.
mcopy source destination
Copy a file from/to a DOS filesystem (no mounting necessary). E.g.,
mcopy a:\autoexec.bat
~/junk
. See man mtools for related commands: mdir, mcd, mren, mmove, mdel, mmd, mrd,
mformat ....
mv source destination
Move or rename files. The same command is used for moving and renaming files and directories.
ln source destination
Create a hard link called destination to the file called source. The link appears as a copy of the
original files, but in reality only one copy of the file is kept, just two (or more) directory entries
point to it. Any changes the file are automatically visible throughout. When one directory entry
is removed, the other(s) stay(s) intact. The limitation of the hard links are: the files have to be on
the same filesystem, hard links to directories or special files are impossible.
ln -s source destination
Create a symbolic (soft) link called "destination" to the file called "source". The symbolic link
just specifies a path where to look for the file. In contradistinction to hard links, the source and
destination don't not have to tbe on the same filesystem. In comparison to hard links, the
drawback of symbolic links are: if the original file is removed, the link is "broken", symbolic
links can also create circular references (like circular references in spreadsheets or databases,
e.g., "a" points to "b" and "b" points back to "a").
rm files
Remove (delete) files. You must own the file in order to be able to remove it. On many systems,
you will be asked or confirmation of deleation, if you don't want this, use the "-f" (=force)
option, e.g.,
rm -f * will remove all files in my current working directory, no questions asked.
mkdir directory
Make a new directory.
rmdir directory
Remove an empty directory.
rm -r files
(recursive remove) Remove files, directories, and their subdirectories. Careful with this
command as root--you can easily remove all files on the system with such a command executed
on the top of your directory tree, and there is no undelete in Linux (yet). But if you really wanted
to do it (reconsider), here is how (as root): rm -rf /*
cat filename | more
View the content of a text file called "filename", one page a time. The "|" is the "pipe" symbol
Vedere la pagina 44
1 2 ... 40 41 42 43 44 45 46 47 48 49 50 ... 59 60

Commenti su questo manuale

Nessun commento