====== Linux: sumario de comandos ======
^ Comando ^ Uso ^ Descripción ^
| adduser | adduser jcperez
| Comando para crear usuarios cómodamente, agregándolos a grupos y con características según la configuración que se encuentra en /etc/adduser.conf. Este comando no existe en todas las distribuciones |
| alias | alias help=man
alias ll="ls -al"
| Permite reemplazar comandos con un nuevo nombre y funcionalidad, incluyendo parámetros y valores |
| apropos | apropos keyword
| Muestra los comandos que existen para una cadena buscada |
| at | at 1:23 lp /home/index.html
at 1:50 echo "lp Job Done"
| Permite la ejecución de tareas por única vez a la hora especificada |
| This uses the echo command to send a message at 1:50 saying a print job is done
at -l
| Lists all scheduled jobs; an alias for the atq command
at -d 5555
| This will cancel job number 5555; an alias for the atrm command
batch
Example: | Temporarily blank
cat
cat /etc/filename
| Prints specified file to the screen
cat file.a > file.b
| Moves file.a to file.b
cat file.a > file.b
| Appends the content of file.a to the end file.b
cd
cd /home/dsoneil
| Changes directories to the specified one
cd ~username
| This will move you to the users specified home directory
chfn
chfn dsoneil
| This will allow you to change finger information on that user
| As an example it will allow you to change dsoneil to Darcy S. O’Neil
chmod
chmod 666 filename
| This command will give a file Read - Write permission for everyone
chmod 777 filename
| This command gives Read - Write - Execute permission to everyone
chmod a=rwx file
| This gives Read - Write - Execute permission to all users
For a complete listing of the available chmod permission commands please refer to Page 4 - Table 1
chown
chown dso /home/html
| This command will change the owner of the specified directory to dso
chown dso /home/file.a
| This command will change the owner of the specified file to dso
clear
clear
| This will clear your screen
cmp
cmp -s file.a file.b
| Compares 2 files of any type. The -s option will return nothing in the files arethe same
cp
cp file.a file.b
| This will create a duplicate of file.a under a new file name, file.b
cpio
ls /home | cpio -o > /root
| This will copy the files of /home to the directory /root
cpio -it < /root > bk.indx
| This will extract all of the files to /root and creates an index file called bk.indx
cpkgtool
| Graphical front end to installpkg, removepkg, makepkg that uses ncurses.
cron
|Comming Soon!
du
du -k /home/html
| Provides a summary of the disk space usage, in kb, within the specified path
du -k /home/html/file.a
| Provides a summary of disk spaced used by a particular file
df
df -h
| Displays the total size, used and available space on all mounted file systems
fdformat
fdformat /dev/fd0
| low level format of a floppy device in drive fd0
fdformat /dev/fd0H1440
| This will fromat a “Double Sided High Density”disk
file
file file.a
| This command will try to determine what type of file file.a is. (exec, text, etc.)
file -z file.a.tar
| Looks inside a compressed file to determine it’s type.
file -L file.a
| Follows symbolic links to be followed to determine file type
find
find /path -name passwd
| Locates the specified string (passwd), starting in the specified directory (/path)
| All filenames or directories containing the string will be printed to the screen
finger
finger
| This will list all users currently logged into the UNIX system
free
free -t -o
| Provides a snapshot of the system memory usage
fsck
fsck /hda
| file system check and repair
git
| This is a file system viewer
grep
cat /etc/passwd | grep dso
| This searches for and limits the command output to the pattern specified
| In this case all instances of dso from the /etc/passwd file are printed
grep -i “Sample” /home/dsoneil
| The -i option makes the search indifferent to case (e.g. sample or SAMPLE)
groupadd
groupadd sudos
| Create a new group called sudos on the system
groups
groups
| Shows which groups you are in
gzip
gzip file.a
| This will zip file.a and give it the extension file.a.gz
gzip -d file.a.gz
| This will unzip the file file.a.gz
tar -zxvf file.a.tar.qz
| The z flag allow you to decompress the tar file on the fly
hostname
| Get or set hostname. Typically, the host name is stored in the file /etc/HOSTNAME.