Guida completa ai comandi di Linux

QuickReference (Vedi oppure Vedi)

* A *





agetty is a small version of getty, usefull only to login on virtual console or serials port. Sintassi: agetty [optios] < velocity > [,... ] < port > [tarminal] Opzioni: "port" is the device to use, like tty1 if you want to use /dev/tty1 "velocity" a comma separated list of bps velocity. "terminal" the kind of terminal emulation to use Options -h enable hardware control, i.e. RTS/CTS -i don't show the content of /etc/issue before the user logon -f < file > specify a diffent file to use instead of /etc/issue -I initialization string to send to the terminal -l specify a differnt program instead of /bin/login -m try to autoscan for the modem transmission velocity -t login timeout in seconds -w Wait for or before to send the issue file -----------------------------------------------------------------------


Define an alias for a command. Typeing alias with no arguments cause to show the list of all the aliases Typeing an alias with no value cause to erase the alias for that name When defining a new alias there must be no blank-space between the name and the value Sintassi: alias [< name > [= < value > ] ... ] Example: alias dir='ls -al' -----------------------------------------------------------------------


alien converts packages between different distribution into Debian o RedHat formats. Sintassi: alien {--to-deb | --to-rpm} [options] < package_name > ----------------------------------------------------------------------


Search into the 'whatis' database, that contain info about the command system, for one or more words. The 'whatis' database is generated thru' the command 'makewhatis'. apropos, instead of whatis, display all the string that match with the search pattern instead of only the first. -----------------------------------------------------------------------






Display information upon the architecture of your machine -----------------------------------------------------------------------


Schedule a command for a single execution Sintassi: at [option] [datetime] Opzioni: [AM|PM] or [AM|PM] today tomorrow | | . . now + + < minutes | hours | days | weeks > -q < a..z> Specify the letter that identify the "queue" where to put the job -m Send a mail when the job is executed -f < file > Get the command to run from this file -l Act as 'atq' -d Act as 'atrm' -b Act as 'batch' -v In 'atq' mode let to know the execution time (1) at -f file_name [-m] time [date] "file_name" is the script to be executed "-m" send a mail message when the command is has been executed "time" must be in the format hh:mm am/pm or can be 'midnight' or in the form 'now+h' "date" must be in the form "Dec 25 1994" (2) at -l list the command scheduled (3) at -r job delete the scheduled command -----------------------------------------------------------------------


List the content of an 'at' queue -----------------------------------------------------------------------


Remove a job from the 'at' queue -----------------------------------------------------------------------


This program is used internally by "cron" to see if there are jobs pending on the "at" or "batch" tail. It usually is run every minutes. -----------------------------------------------------------------------


An interpreted language, very usefull for text manipulation and shell script. Synonims are gawk and nawk -----------------------------------------------------------------------

* B *


badblock is used to check the low-level integrity of a disk or partition, i.e. it check for bad blocks/clusters Sintassi: badblocks [optons] < device > < number_of_blocks > [first_block] Opzioni: -b < block_size > Tell the size of every block. Default value is 1024 -w LOW-LEVEL FORMAT YOUR DRIVE, DO NOT USE !!!! Esempi: badblocks /dev/fd0 1440 -----------------------------------------------------------------------


Generate on the stdout a banner of the text specified on the command line. It is genereally used to print banners. -----------------------------------------------------------------------


Bourne Again SHel This is just your shell, i.e. the "" for windoze addicted Shortcut Effect Up Arrow Scroll the history backward Dn Arrow Scroll the history forward Left Arrow Move cursor back Right Arrow Move cursor forward Ctrl+b Move cursor back Ctrl+f Move cursor forward Backspace BackSpace Ctrl+d Delete a char Ctrl+a Move cursor to the start of the line Ctrl+e Move cursor at the end of the line Alt+f Move cursor one word forward Alt+b Move cursor one word backward Ctrl+l Clear the screen -----------------------------------------------------------------------


Strip the path from a filename, and eventually also the suffix Sintassi: basename < pathname > [suffix] Esempi: basename /home/denny/test.awk Return "test.awk" basename /home/denny/test.awk .awk Return "test" -----------------------------------------------------------------------


A job scheduler, the syntax is the same as 'at' but a job is executed only if the system is not heavy loaded. -----------------------------------------------------------------------


A textbased calculator -----------------------------------------------------------------------


Resume a suspended job in background. Sintassi: bg [job] -----------------------------------------------------------------------


Check if you have new mail -----------------------------------------------------------------------

boot parameters

(Sorry, link unavailable) -----------------------------------------------------------------------

* C *


Print a calendar on the console Sintassi: cal [month] [year] -----------------------------------------------------------------------


A console program to manage a Diary -----------------------------------------------------------------------


Delete a print job -----------------------------------------------------------------------


Display one or more files, usually is also used to append one file to another. Sintassi: cat [ option ] < file(s) > Examples: cat firstfile secondfile cat head body tail > dog Opzioni: "-A" "--show-all" show all the non-printable chars, act like "-vET" "-b" "--number-nonblank" number all the nonblank lines starting from 1 "-E" "--show-ends" append the symbol "$" at the end of each line "-s" "--squeeze-blank" substitute multiple blanklines with only one "-T" "--show-tabs" substitute the char with the symbol "^I" "-v" "--show-nonprinting" convert all the non-printable chars into a visible form -----------------------------------------------------------------------


Change the current directory Esempi: cd /tmp Goes into the directory tmp cd ~ Go into the user's home directory cd ~kim Goes into the kim's home directory cd .. Goes to the higher level directory -----------------------------------------------------------------------


A cd writing program. -----------------------------------------------------------------------


cfdisk is like "fdisk" eccept that it use an interactive interface. Sintassi: cfdisk [options] [device] -----------------------------------------------------------------------


This program change the attributes of a file on a Ext2 filesystem Sintassi: chattr [options] [mode] < file > Options/Attributes: "+" Add the following attribute to the file "-" Remove the following attribute from the file "A" Tell to not update the access time (aime). This reduce the disk activity "a" Tell that a file can be only open in "append" mode when someone want to write "c" Let the kernel manage compression/decompression on the file (NOT IMPLEMENTED YET!) "d" Tell to the dump program that this program must no be backup-ed "i" The file is "immutable" "s" When the file is delete the block occupated by it are filled with zero. "S" Syncronize all the operation upon this file, without using the disk cache "u" Let undelete this file (NOT IMPLEMENTED YET!) -----------------------------------------------------------------------


Let to change the "finger" (name, address, telephone) information stored into /etc/passwd Sintassi: chfn [options] [user] -----------------------------------------------------------------------


Change the group that own a file or directory. See "chown" for the complete syntax Sintassi: chgrp [options] [group] Opzioni: "-R" Change the permission into every sub-directory -----------------------------------------------------------------------


Change the permissions upon the specified file or directory Sintassi: chmod [options] < mode > < file > Opzioni: "-R" change the permission into the subdirectories Mode Sintassi: [ugoa][[+-=][rwxXstugo] "u" the user that own the file "g" the group that own the file "o" the other users "a" everybody "+" add those permissions "-" remove those permissions "=" assign those permissions "r" Add the read permission "w" Add the write permission "x" Add the execute permission "X" "s" "t" Enable the sticky bit. "u" Set the same permission has the user that own the file "g" Set the same permission has the group that own the file "o" Set the same permission has the "other" user -----------------------------------------------------------------------


Change the user that own a file Sintassi: chown [options] [user][:|.][group] file Opzioni: "-R" change the permission into the subdirectories -----------------------------------------------------------------------


????? -----------------------------------------------------------------------


Let you change the predefinite shell into /etc/passwd. It is possible to set only an existing shell, mentioned into /etc/shells Sintassi: chsh [options] [user] Opzioni: "-s " "--shell " Let you specify a shell "-l" "--list-shells" Display the content of /etc/shells -----------------------------------------------------------------------


Change the current Virtual Terminal, i.e. switch the terminal like ALT +[Fn] programmatically -----------------------------------------------------------------------


Clear the screen -----------------------------------------------------------------------


Access the hardware clock of the machine Sintassi: clock [-u] [-r | -w | -s | -a] Opzioni: "-u" Set the clock in Universal Time (UTC) "-r" Display the hardware clock "-w" Update the system clock with the hardware clock "-s" "-a" Update the system clock with the hardware clock in conjunction with the error adjustment specified into /etc/adjtime Esempi: clock -w Update the system clock with the value into the BIOS -----------------------------------------------------------------------


Compare two files -----------------------------------------------------------------------


Old Compression utility, generate a file with .Z suffix. To unzip use uncompress Sintassi: compress [-v] < file_name > "-v" display the compression rate -----------------------------------------------------------------------


Copy one or more file or directory Sintassi: cp [option] < source > < target > "-a" same as "-dpR", make an exact copy of everything (include symlink) "-b" maintain a backup copy of every file that is overwritten "-d" or "--no-deference" copy symlinks without the linked file "-f" or "--force" force overwrite of the target file "-i" or "--interactive" ask for confirmation before overwite any file "-l" or "--link" make hard-link instead of copy file "-P" or "--parents" Copy the path specified into the source "-p" or "--preserve" keep orignal date, owner and permission "-r" recursive copy every subdirectory, every file is considered normal "-R" or "--recursive" recursive copy every subdirectory "-s" or "--symbolic-link" make a symlink instead of copy the file (not true for directory) "-S < backup_suffix >" or "--suffix= " Specify a suffix to use when making backup copies of overwritten files "-V < backup_type >" or "--version-control=< backup_type >" Specify how to handle backup copies Backup Types: "t" "numbered" number every backup copy "nil" "existing" perform a numbered backup for only the file that already have been backup-ed with "t" "never" "simple" perform a simple backup, non numbered copy just only one Environment Variables: VERSION_CONTROL Contain the backup type. SIMPLE_BACKUP_SUFFIX Contain the suffix to use when making a "simple" backup Examples: cp -r /test/* ~/test cp -dpR /test ~/test -----------------------------------------------------------------------


Manage archive of files, like TAR. cpio is used instead of cp or other tools because: - It can access tape drives on other hosts using TCP/IP. - `-o' and `-p' can copy symbolic links either as symbolic links or, with `-L', as the files they point to. - `-i' automatically recognizes the archive format and tries to recover from corrupted archives. - The output of '-itv' looks like 'ls -l'. - It accepts long-named options as well as traditional single-character options. Syntax "copy-out " : cpio -o [options] [< name list] [> ] Read from the standard input a list of names (one for line) that are archived to the standard output Syntax "copy-in" : cpio -i [options] [ ] [< ] Read from the standard input the name of the archive from wich extract the files Syntax "copy-pass" : cpio -p [options] < target dir > [< name list >] Read from the standard input a list of names (one for line) that are copied to the destination directory Opzioni: "-o" "--create" copy-out "-A" "--append" Append data to an archive specified with the "-O" option "-L" "--dereference" copy only the symlink not the file "-O < archive name >" Specify the name of the archive to create or append instead of the standard output "-i" "--extract" copy-in "-d" "--make-directories" "-E < file >" "--pattern-file=< file >" Read a model that list the file to extract "-f" "--nomatching" Copy the files that do not match with the specified model "-I < archive >" Specify the name of the archive to use instead of the standard input "-t" "--list" List the content of an archive "-p" "--pass-through" copy-pass "-d" "--make-directories" "-l" "--link" create link instead of copy the files "-L" "--dereference" -----------------------------------------------------------------------


This is the "daemon" that manage the system's job scheduler -----------------------------------------------------------------------


Let you modify the "crontab" file for a specified user. The crontab file is used by the daemon cron (a system scheduler) to run specified program at a given time. "crontab -l" view the current crond settings Sintassi: crontab [options] [file] Opzioni: -u Replace the crontab of the user with the specified file -l View the crontab of that user -e Create or modify the crontab of the user -r Delete the crontab of the user -----------------------------------------------------------------------


????? -----------------------------------------------------------------------


????? -----------------------------------------------------------------------


Call another system via modem

* D *


Show/modify the current system's date and/or time Sintassi: date [options] [+ format] [date] Opzioni: "-d < date >" "--date= " Display the date-time "-s < date >" "--set= " Set the new system's date-time "-u" "--universal" Display or set the date-time in universal time (UTC) Examples: date + "%r" display only the time date + "%D" display only the date Formats: %% Show a "%" %n newline %t tab %s number if second from the specified epoch %c same as the string "%a %b %d %X %Z %Y" %H hour in format 00..23 %I hour in format 00..12 %k hour in format 00..23 %l hour in format 00..12 %M minutes in format 00..59 %S seconds in format 00..59 %p AM or PM %Z include timezone %r time in 12 hour format ``hh:mm:ss AM/PM''. %T time in 24 hour format ``hh:mm:ss'' %X time like the string "%H:%M:%S" %a short week day name %A long day name %U week of the year, between 00..53 %w day of the week, between 0..6 where 0 is sunday %b Show month name %h like %b %B long month name %m month in format 00..12 %y year in format 00..99 %Y year in format 0000..9999 %d day of the month in format 00..31 %j day of the year in format 01..366 %D date in format `mm/gg/aa' %x local date view -----------------------------------------------------------------------


Utility to view DBase files -----------------------------------------------------------------------


dd (Data Dublicator or Data Dump) is a low level copy program. Sintassi: dd [options] Opzioni: if=< file > Specify the input file or device of=< file > Specify the output or the device ibs= Specify a block size in byte for the input file obs= Specify a block size in byte for the ouput file bs= Ovveride both ibs and obs parameters cbs= Specify the dimension of the buffer used to convert the file skip= Specify how many block to skip before to start reading from the input file seek= Specify how many block to skip before to start writing to the output file count= Specify the amount of block to be copied conv= [, ]... Specify one or more conversion step Conversion types: ascii Convert from EBCDIC to ASCII. ebcdic Convert from ASCII to EBCDIC. ibm Converte from ASCII-IBM to EBCDIC. block Treat the input file like a set of record that end with the "newline" char. This record are trunced or expanded to fit the dimension of a block upon the output file unblock Every block of the input file is readed and the final spaces are substituted with a newline char. lcase Trasform from uppercase to lowercase ucase Trasform from lowercase to uppercase swab Exchange pair of byte, i.e. from bigendian to littleendian and viceversa noerror Ignore every error into the reading of the input file notrunc The output file isn't truncated if it is bigger than the required space sync Adjust the lenght of every input block adding a newline char at the end Suffixes: Every option that require a byte value or block lenght can be take a suffix to specify a greate quantity. These are: "b" specify block of 512 byte "c" char (1byte) "k" size is expressed in kilobyte (1024 bytes) "w" size is ( n * 2 ) "x " size is ( n * m ) Exampes: dd if=/vmlinuz of=/dev/fd0 This copy the kernel upon your floppy disk dd if=/vmlinuz of=/dev/fd0 obs=18k Same as above, but 3"1/2 floppy disk use a block size of 18 KB dd if=disk.img of=/dev/fd0 Copy an image upon floppy -----------------------------------------------------------------------


'depmod -a' will create the file 'modules.dep' under '/lib/modules'. This file is used to find the kernel modules by the "kerneld" daemon -----------------------------------------------------------------------


The dev directory contain special files that permit direct access to the hardware /dev/fd0 first floppy unit /dev/hda first IDE/EIDE hard disk /dev/hda1 first partition on the first IDE/EIDE hard disk /dev/hdb second IDE/EIDE hard disk /dev/sda fisrt SCSI hard disk /dev/sda1 first partition on the fisrt SCSI hard disk /dev/lp0 first parallel port /dev/lp1 second parallel port /dev/cua0 first serial port, i.e. COM1: /dev/ttyS0 first serial port, only in input /dev/null the NULL device, every read or write has no effect -----------------------------------------------------------------------


Display the amount of free space on the disks Sintassi: df [options] [device] Opzioni: "-a" "--all" Show info upon all the devices "-b" "--byte" Display memory in bytes "-h" "--human-redable" Display info into "human readable" form :-) "-i" "--inodes" Display size into inode "-k" "--kilobytes" Display memory in kilobytes "-m" "--megabytes" Display memory in megabytes -----------------------------------------------------------------------


A usefull program to display dialog in textmode -----------------------------------------------------------------------


Compare two text files and create a 'diff' file to be used by the patch program to apply them. Used widely into the kernel (or large) development project Sintassi: diff [-b] [-i] [-w] < file or dir > < file or dir > "-b" treath multiple blank/spaces as only one "-i" ignore the char case "-r" recurse subfolders "-w" ignore tabs and space -----------------------------------------------------------------------


You really don't know about this ?!? -----------------------------------------------------------------------


Configure the color for the 'ls' command. Use: eval `dircolors [options] [file] Opzioni: If a file is not specified then dircolors try to use first ~/.dir_colors then it look for /etc/DIR_COLORS -----------------------------------------------------------------------


Compare two directory -----------------------------------------------------------------------


Display the list of the directories stored into a stack. To save/restore a dir the command 'pushd' and 'popd' are used Sintassi: dirs [-l] [+/-n] Opzioni: "+n" Show only "n" elements form the top of the stack "-n" Show only "n" elements form the bottom of the stack "-l" Show the list into the "long" format -----------------------------------------------------------------------


Return the directory name from a filename specified in input Sintassi: dirname < file_name > -----------------------------------------------------------------------


????? -----------------------------------------------------------------------


????? -----------------------------------------------------------------------


????? -----------------------------------------------------------------------


????? -----------------------------------------------------------------------


????? -----------------------------------------------------------------------


Debian Package Manager. Install, deinstall, update any debian package Sintassi: Usage: dpkg -i|--install <.deb file name> ... | -R|--recursive < dir > ... dpkg --unpack <.deb file name> ... | -R|--recursive < dir > ... dpkg -A|--record-avail <.deb file name> ... | -R|--recursive < dir > ... dpkg --configure ... | -a|--pending dpkg -r|--remove | --purge ... | -a|--pending dpkg --get-selections [ ...] get list of selections to stdout dpkg --set-selections set package selections from stdin dpkg --update-avail replace available packages info dpkg --merge-avail merge with info from file dpkg --clear-avail erase existing available info dpkg --forget-old-unavail forget uninstalled unavailable pkgs dpkg -s|--status ... display package status details dpkg --print-avail ... display available version details dpkg -L|--listfiles ... list files `owned' by package(s) dpkg -l|--list [ ...] list packages concisely dpkg -S|--search ... find package(s) owning file(s) dpkg -C|--audit check for broken package(s) dpkg --print-architecture print target architecture (uses GCC) dpkg --print-gnu-build-architecture print GNU version of target arch dpkg --print-installation-architecture print host architecture (for inst'n) dpkg --compare-versions < b > compare version numbers - see below dpkg --help | --version show this help / version number dpkg --force-help | -Dh|--debug=help help on forcing resp. debugging dpkg --licence print copyright licencing terms Use dpkg -b|--build|-c|--contents|-e|--control|-I|--info|-f|--field| -x|--extract|-X|--vextract|--fsys-tarfile on archives (type dpkg-deb --help.) For internal use: dpkg --assert-support-predepends | --predep-package | --assert-working-epoch Opzioni: --admindir=< directory > Use < directory > instead of /usr/var/dpkg --root=< directory > Install on alternative system rooted elsewhere --instdir=< directory > Change inst'n root without changing admin dir -O|--selected-only Skip packages not selected for install/upgrade -E|--skip-same-version Skip packages whose same version is installed -G=--refuse-downgrade Skip packages with earlier version than installed -B|--auto-deconfigure Install even if it would break some other package --largemem | --smallmem Optimise for large (>4Mb) or small (<4Mb) RAM use --no-act Just say what we would do - don't do it -D|--debug= Enable debugging - see -Dhelp or --debug=help --ignore-depends= ,... Ignore dependencies involving --force-... Override problems - see --force-help --no-force-...|--refuse-... Stop when problems encountered Comparison operators for --compare-versions are: lt le eq ne ge gt (treat no version as earlier than any version); lt-nl le-nl ge-nl gt-nl (treat no version as later than any version); < << <= = >= >> > (only for compatibility with control file syntax). Use `dselect' for user-friendly package management. Examples: dpkg -i Install the specified package dpkg -r Erase the previous installed package without deleting the configuration files dpkg --purge Full erase the installed package dpkg -l List all the installed packages dpkg -S Try to indentify which package contain the file specified into the model dpkg -C Check for pending packages to install -----------------------------------------------------------------------


Display the amount of space used by a directory or a file Sintassi: du [options] [dir or file ] Opzioni: "-a" "--all" Show info upon all the devices "-b" "--byte" Display memory in bytes "-c" "--total" Display a general total "-h" "--human-redable" Display info into "human readable" form :-) "-i" "--inodes" Display size into inode "-k" "--kilobytes" Display memory in kilobytes "-m" "--megabytes" Display memory in megabytes "-s" "--summarize" Display a total for every argument "-S" "--separate-dirs" Do not display the space used by subdirs "-x" "--one-file-system" Do not go into different filesystem mounted on some subdirs -----------------------------------------------------------------------


????? -----------------------------------------------------------------------


Dump to the standard outpt the current keyboard map -----------------------------------------------------------------------

* E *


echo a string to the standard output Sintassi: echo [options] "string" Opzioni: "-n" do not start a new line "-e" enable parsing of escape sequences "-E" enable parsing of escape sequences Escape sequences: \a bell \b backspace; \c suppress the final newlin char \f form feed \n newline \r carriage return \t tab \v vertical tab \\ backslash \ooo a char code into octal system -----------------------------------------------------------------------


A very old and very owful editor -----------------------------------------------------------------------


Let you assign and modify the "quota" for every user. This need the presence of the files quota.user and Sintassi: edquota [options] [user] Opzioni: "-u" Modify the user quota "-g" Modify the group quota "-p


Tee "E"xpanded version of "grep" -----------------------------------------------------------------------


A (e-)mail client -----------------------------------------------------------------------


????? -----------------------------------------------------------------------


The most famous Unix program. A powerfull and customizable text editor -----------------------------------------------------------------------


Display all the environment variables -----------------------------------------------------------------------


Exit, exits from a shell, from a "su" session, from a console and many more ... -----------------------------------------------------------------------


????? -----------------------------------------------------------------------


Part of the Slackware distribution, unzip the content of a Slackware package -----------------------------------------------------------------------

* F *


????? -----------------------------------------------------------------------


????? -----------------------------------------------------------------------


????? -----------------------------------------------------------------------


Format a floppy disk at low-level Sintassi: fdformat [-n] < device_name > Esempi: fdformat /dev/fd0 Format the disk into your drive A: -----------------------------------------------------------------------


fdisk is a program to edit the partition table of your HD If you don't know what i'm talking about don't use it ! You may delete everything on your PC !! Sintassi: fdisk [options] [device] Opzioni: -l List all the partition on hard-disk IDE and SCSI -s < partition > Get the size of that partition -----------------------------------------------------------------------


Resume a suspended job Sintassi: fg [job] -----------------------------------------------------------------------


A version of "grep" with the "-f" parameters as default -----------------------------------------------------------------------


Tell you what kind of file is the one you specified. Require the file /etc/magic Sintassi: file [options] < filename > -----------------------------------------------------------------------


Search for one or more file and output his/their complete path Sintassi: find < starting_path > [options] Opzioni: "-atime +days" search file not accessed for n days "-depth" start from the last subdirectoy instead that from the root "-exec command \;" for every file execute a command "-iname < file_name >" search for a case-insensitive pattern "-mtime +days" search file not modified for n days "-name < file_name >" search for a case-sensitive pattern "-noleaf" do not optimize the search, to be used on cd-rom "-ok command \;" for every file execute a command asking user confirmation "-print" "-user < user_name > " "-xdev" search only into this Filesystem, does not search into mounted subdirectory (i.e., cdroms, NFSs) -----------------------------------------------------------------------


Display the peoples connected to a computer -----------------------------------------------------------------------


????? -----------------------------------------------------------------------


Wrap lines of a specified size -----------------------------------------------------------------------


Show the amount of free memory (RAM) Sintassi: free [options] Opzioni: -b Show size in bytes -k Show size in kilobytes -t Show a line with totals -o Disable buffer adjusting -s update results each the nr. of secs. -----------------------------------------------------------------------


Check the integrity of a filesystem. This is a front-end to a serie of fsck.* files like (fsck.ext2, fsck.dos, fsck.xia, ecc.) Sintassi: fsck [options] [-t ] [ ] -----------------------------------------------------------------------


This command, also know as "e2fsck", check an ext2 filesystem Sintassi: fsck.ext2 [options] Opzioni: -c Use "badblocks" to check damaged block -f Force the checking f the fs -F Flush the disk cache before to start checking -n Perform a read-only control without changing anything -p Perform an automatic repair of the filesystem -y like -p Exit status: 0 no errors 1 errors 2 errors upon a mounted FS, need reboot 4 errors not fixed -----------------------------------------------------------------------


This command, also know as "dosfsck" let you check a DOS-FAT16 filesystem. Sintassi: fsck.msdos [options] Opzioni: -a Perform an automatic repair of the filesystem -r Interactive repair of the filesystem -t mark not-readable cluster as bad-blocks Exit status 0 no errors 1 found solvable errors 2 syntax errors -----------------------------------------------------------------------


????? -----------------------------------------------------------------------


Really don't know this ??? :-) -----------------------------------------------------------------------


????? -----------------------------------------------------------------------


Tell wich user is locking a file Sintassi: fuser [options] < file > Opzioni: -a Show all the listed files not only the used once -k Kill all the process that are using that files - Send the signal to the process who are using the file -m Means that the file is a device -u Tell the user that is owning the process who own the file -v Use a table format to show file in use -s Suppress output -----------------------------------------------------------------------

* G *


A version of "awk" with the "-g" parameter by default -----------------------------------------------------------------------


????? -----------------------------------------------------------------------


????? -----------------------------------------------------------------------


Getty is a program that is run at boot time. It let you login on your system. Sintassi: getty [options] [ [type] ] Opzioni: "-c " Check the syntax of a gettydefs file, like /etc/gettydefs "-d " Specify a configuration file rather tha /etc/gettydefs "-r " Second to delay before to display the login message "-w " Set a string to wait before to start to displaying the login prompt "-t " Set the timeout for the login Example (/etc/inittab) : # Start getty to listen on the first virtual console 1:12345:respawn:/sbin/getty tty1 # Start getty to listen on the second serial line s1:2345:respawn:/sbin/getty ttyS1 DT19200 vt100 -----------------------------------------------------------------------


????? -----------------------------------------------------------------------


????? -----------------------------------------------------------------------


A daemon to handle mouse selection, and also cut & past, in textmode Sintassi: gpm [options] Opzioni: -B < button order sequence > Set the button order sequence -t < type > Set the mouse type -2 Force a 2 button mouse -3 Force a 3 button mouse -S "command1:command2:command3" Set commands for the mouse "triple-click" Mouse types: mman Mouseman. ms Microsoft with 2 or 3 button bare Microsoft with 2 button msc MouseSystem with 3 button sun MouseSystem variant mm MMSeries logi Logitech serial mouse bm Microsoft BusMouse or compatible ps2 IBM PS/2 Busmouse and compatible (the ones with a circular connector) ncr NCR3125pen. wacom Wacom graphical table -----------------------------------------------------------------------


????? -----------------------------------------------------------------------


Change the shadow-password for a group stored into /etc/gshadow The password for a group is used to let users that are not member of this group to become parts of it by the command "newgrp" Sintassi: gpasswd [options] Opzioni: -A Modify the list of the administrators for that group -M Modify the list of user part of that group -a Add a user for that group -d Let an administrator to delete a member -r Let an administrator to delete a password -R Let an administrator to disable access through the use of password -----------------------------------------------------------------------


Search for a pattern into one or more files Syntax "grep": grep [options] text_pattern file_names Syntax "egrep": grep [options] -e text_pattern file_names Syntax "ggrep": grep [options] -f text_pattern file_names Opzioni: "-c" output only the total of line matching the expression "-E" use an extended regular expression "-e" Specify a model to search "-F" use a fixed string model "-f" specify a file with the model "-G" use a normal regular expression "-h" suppress heading "-i" case insensitive "-l" display the name of the non-matching files "-l" display only the files name that content match the expression "-n" append the number of line "-v" search for lines that does not contain the text "text_pattern" can contain the following special chars "^" search for the text at the starting of the line "$" search at the end of the line -----------------------------------------------------------------------


????? -----------------------------------------------------------------------


Add a group to the shadow password Sintassi: groupadd [options] -----------------------------------------------------------------------


Delete a group from the shadow password Sintassi: groupdel -----------------------------------------------------------------------


Show the groups list or the group wich a user is member This command is the same as "id -Gn [user] " Sintassi: groups [users] -----------------------------------------------------------------------


Check the syntax of the file /etc/group and of /etc/gshadow (using also /etc/passwd Sintassi: grpck [-r] [ [ ]] "-r" force to program to not make any changes only to output problem -----------------------------------------------------------------------


Convert the group file /etc/group into /etc/group and /etc/gshadow Sintassi: grpconv -----------------------------------------------------------------------


UnConvert the shadow password to the normal group /etc/group At the end the file /etc/gshadow is erased. Sintassi: grpunconv -----------------------------------------------------------------------


????? -----------------------------------------------------------------------


Uncompress a .gz file, compressed with gzip Esempi: gunzip -d backup.tar.gz will return "backup.tar" and erase backup.tar.gz -----------------------------------------------------------------------


????? -----------------------------------------------------------------------


Compress one file. To unzip use the gunzip command Sintassi: gzip [options] [file] "-9" use the maximum compression value "-c" ouput the result to the standard output "-d" force decompression instead of compression "-r" recursively compress every file into a sub-directory "-t" check the integrity of compressed files Esempi: gzip -9 backup.tar create "backup.tar.gz" and will erase backup.tar

* H *


????? -----------------------------------------------------------------------


????? -----------------------------------------------------------------------


View only the first lines of a file Sintassi: head [-row] file_name -----------------------------------------------------------------------


Display the on-line help for a command -----------------------------------------------------------------------


Display the shell history -----------------------------------------------------------------------


????? -----------------------------------------------------------------------



* I *


Display the user's ID (UID) or the group ID (GID) Sintassi: id [options] [user] Opzions: "-u" "--user" Display only the UID "-g" "--group" Display only the GID "-G" "--groups" Display only the numbers of extra group "-n" "--name" Display only the user or group name "-r" "--real" Display only the real UID/GID -----------------------------------------------------------------------


????? -----------------------------------------------------------------------


????? -----------------------------------------------------------------------


????? -----------------------------------------------------------------------


A version of "awk" with the parametes "-i" as default -----------------------------------------------------------------------


????? -----------------------------------------------------------------------


Init is the first task that the kernel execute. His job is to start, according to the choosen runlevel, the script for starting, stopping or rebooting the system. Sintassi: init [options] Opzioni: -t Nr. of seconds to wait before to change "runlevel" 0..6 Change to a runlevel between 0 and 6 a|b|c Run one of the "on demand" level q ReScan /etc/inittab s Go into single user -----------------------------------------------------------------------


A text-base reader for "info" documentation Sintassi: info [options] [voice] Opzioni: --directory Specify where to find info files -f < file > Specify an info file -n Specify a particular node Keyboard Shortcuts: q Quit the program h View the on-line help ? View the list of all available command d View the 'dir' file l Return back to the previous node n View the next node p View the previous node u View the upper node SPACE Scroll the node forward CANC Scroll the node backward b Go to the beginning of the node TAB move the cursor thru' the hyperlink ENTER go to the selected hyperlink s apple Search for 'apple' inside the text -----------------------------------------------------------------------


????? -----------------------------------------------------------------------


Insmod is used to load a module into the kernel -----------------------------------------------------------------------


Copy a file assigning permission to it Sintassi: install [options] Options (see 'cp') : "-b" "--backup" "-S" "--suffix" "-V" "--version-control" Options : "-d < directory >" Create the specified dirs "-g " Specify the owner group "-m " Specify the permission "-o " Specify the user who own the file -----------------------------------------------------------------------


This install a Slackware Package Sintassi: installpkg [options] < package_filename > "-warn" Don't perform the installation just prompt what will happen "-r" Use current directory as root for installing the package "-m" Make a package from the content of the current directory -----------------------------------------------------------------------



* J *


Display the list of jobs Sintassi: jobs [options] [job] Opzioni: -l Display with PID -p Display only PID -n Display only the jobs that toggled their fg/bg state -----------------------------------------------------------------------


A usefull editor, also included in my "Little Italy Linux" It accept command like the old Turbo Pascale editor Commands: CTRL + K + F Search/Replace CTRL + K + S Save current file without quitting CTRL + C Quit without to save, loosing chages CTRK + K + Z Quit saving if changed something

* K *


Used to change the keyboard rate/delay -----------------------------------------------------------------------


Change the keyboard mode. This program is only used to debug a new keyboard layout. Please don't use them if you are not Linus Torvald. -----------------------------------------------------------------------


????? -----------------------------------------------------------------------


One of the most famous program in the world, with "hallo world". It's an old communication program thru' serial lines, we suggest to use 'minicom' if you want test you internet connection. -----------------------------------------------------------------------


kerneld is a 'daemon' that provide auto-load of modules. As example, if you need PPP, kerneld will automatically load it when necessary without running the modprobe or the insmod command. The behaviot of kerneld is controlled by the file '/etc/conf.modules' -----------------------------------------------------------------------


Send a "signal" to a process Sintassi: kill [options] [PID] Opzioni: -s Specify the name or number of the signal to send -l Display a list of all the available signal Signals: 1) SIGHUP 2) SIGINT 3) SIGQUIT 4) SIGILL 5) SIGTRAP 6) SIGIOT 7) SIGBUS 8) SIGFPE 9) SIGKILL 10) SIGUSR1 11) SIGSEGV 12) SIGUSR2 13) SIGPIPE 14) SIGALRM 15) SIGTERM 17) SIGCHLD 18) SIGCONT 19) SIGSTOP 20) SIGTSTP 21) SIGTTIN 22) SIGTTOU 23) SIGURG 24) SIGXCPU 25) SIGXFSZ 26) SIGVTALRM 27) SIGPROF 28) SIGWINCH 29) SIGIO 30) SIGPWR -----------------------------------------------------------------------


Send a signal to all the process who are executing a specified command Sintassi: killall [options] [ - ] [ ] -----------------------------------------------------------------------


????? -----------------------------------------------------------------------


This is the daemon to log the kernel messages. Sintassi: klogd [-f log_file] -----------------------------------------------------------------------



* L *


Display log information about the "login" and the "logout" from /var/log/wtmp of all the user or only from a single user Sintassi: last [options] [user] Opzioni: - or -n Display only "number" events -----------------------------------------------------------------------


Update the file /etc/ and all the system libraries, also add symlink to the right librarie version -----------------------------------------------------------------------


List the libraries required by a program -----------------------------------------------------------------------


See the 'more' program that have an equivalent syntax -----------------------------------------------------------------------


????? -----------------------------------------------------------------------


Sintassi: lilo [options] -C < configuration file > Specify a configuration file rather than /etc/lilo.conf -r Specify a pseudo-root dir -----------------------------------------------------------------------


This is the configuration file used by "lilo" It accept the following options : boot=/dev/hda Specify on which partition or device will be installed LILO. Don't user /dev/hda if you installed WindowNT as your default system. prompt Tell LILO to dispay a prompt when it start timeout=50 Number of 1/10 seconds to wait before LILO exit from the prompt and load the default image image=/boot/vmlinuz With this line start a definition of a Linux kernel image to be loaded. Every line after this will be refered to this image. label=linux Name to be used for the image at the LILO prompt root=/dev/hda2 Specify wich partition must be mounted as root (i.e. /) for the specified image read-only Needed if you are mounting an ext2fs partition other=/dev/hda1 With this line start the definition of a image to be loaded of another OS. label=dos Tell the label to use. table=/dev/hda ( I DON'T KNOW !) -----------------------------------------------------------------------


Create a link (hard or symbolic) to one or more files or dirs Sintassi: ln [options] source_file(s) target_file_or_dir Opzioni: "-n" ask before overwrite an existing file with a link "-s" make a symbolic link instead of an "hard link"
"-b" or --backup "-f" or --force "-i" or --interactive "-S" or --suffix "-V" or --version-control "-d" or "-F" or "--directory" Permit to create and hard link to a directory "-n" or --no-dereference -----------------------------------------------------------------------

loadlin.exe, loadlinx.exe

Boot a Linux kernel from DOS Sintassi: Esempi: LOADLIN c:\vmlinuz root=/dev/hda2 ro Boot an ext2 partition on /dev/hda2 LOADLIN c:\vmlinuz root=/dev/hda1 rw Boot an umsdos partition loadlinX c:\vmlinuz root=c: rw Boot an umsdos partition upon C: -----------------------------------------------------------------------


Load the keyboard layout, like dos keyb xx Sintassi: loadkeys [file] -----------------------------------------------------------------------


Load an Unicode map -----------------------------------------------------------------------


Display/Set the LOCALE information (i.e. internetional settings) Sintassi: locale [options] Opzioni: -a | --all-locale Show all the LOCALE name -m | --charmaps Show all the avilable char maps -----------------------------------------------------------------------


Logger let you add information to the system log Sintassi: logger [-f file_to_include] [message] -----------------------------------------------------------------------


????? -----------------------------------------------------------------------


Output the name of the user you have used at login prompt, reading it from /var/run/utmp To know which user are you currently using use 'whoami' instead. -----------------------------------------------------------------------


Used to configure a "loopback" device -----------------------------------------------------------------------


Print a file Sintassi: lp [-c] [-d < printer >] [-m] [-n < copies >] [-o < print_options > ] [-P < page_to_be_printed >] [-w] < file_to_print > Opzioni: "-c" make a copy of the file to be printed "-d" specifies an output printer "-m" send a mail message when the print job is completed "-n" number of copies to print "-o" specifies print Opzioni: nobanner, nofilebreak, cpi= lpi= , lenght= i, lenght= l, width= width= i "-P" specifies which pages have to be printed "-w" display a message on the screen when the print job is completed -----------------------------------------------------------------------


??????????? -----------------------------------------------------------------------

lpq, lpstat

List the status of all the printers -----------------------------------------------------------------------


List the files present into a directory Sintassi: ls [options] Opzioni: "-l" display info into a "long" format "-a" display all the files including hidden files "-A" like "-a" but does not show the "." and ".." directory (VERY USEFULL) "-q" Change non-printable chars with the "?" symbol "-R" Recurse thru' subdirectories "-t" Sort the result starting from the most recent modify-date "-c" Sort the result starting from the most recent change-date "-u" Sort the result starting from the most recent access-date "-e" Display full date time for the files. "-i" Show inode "-r" Sort in reverse order "-B" Ignore backup files (~) "-C" Use a vertical format organized in columns "-F" Apped a char at the end of a file, depending on its type: * program; / directory; @ symlink; | pipe; = socket "-S" Sort by size "-X" Sort by extension "-1" format using a single column, one file per line "-w " Set the width of the ouput, used if you have a screen more than 80 chars or less "-I " Exclude listing of the specified patterns -----------------------------------------------------------------------


Show the attribute of a file on an ext2 file system Sintassi: lsattr [options] < files > Opzioni: "-R" Recurse thru' subdirs "-a" All files, including hidden "-d" Also list subdirs -----------------------------------------------------------------------


????? -----------------------------------------------------------------------


List all the modules loaded into the kernel Sintassi: rmmod [-r] [module_name] If the -r parameter is specified then rmmod try to 'recursively' remove all unneeded modules depending on the specified once. -----------------------------------------------------------------------

* M *


The second most know program by programmers :-) Make is used to execute makefiles that usually automate the process of compiling your software project -----------------------------------------------------------------------


Use to create a Slackware Package -----------------------------------------------------------------------


This will create the 'whatis' database -----------------------------------------------------------------------


A Mailing program -----------------------------------------------------------------------


The manpages viewer Sintassi: man [options] [name] Opzioni: A section number is between 1 and 9, see manpages below -f Act like 'whatis' -h Show guide -k Act like 'apropos' -----------------------------------------------------------------------


manpages are usually stored into /usr/share/man , dependly on their extension they handle different topics, depending on their category: 1 user command 2 syscall 3 library function 4 devices 5 file formats 6 games 7 misc 8 system commands 9 kernel routine -----------------------------------------------------------------------


????? -----------------------------------------------------------------------


The famous "Midnight Commander", a clone of the Norton Commander dos program. This is included by default into my "Little Italy Linux" -----------------------------------------------------------------------


????? -----------------------------------------------------------------------


????? -----------------------------------------------------------------------


????? -----------------------------------------------------------------------


????? -----------------------------------------------------------------------


mgetty is the daemon that allow you to login onto your system. Its a very complex program. Sintassi: mgetty [options] < linea-tty > Opzioni: "-x " Verbose Level from 0 (none) to 9 "-s " Port speed "-r" Use a serial line with no modem "-p " Customize the login prompt "-i " Use a custom issue file instead of /etc/issue Examples: mgetty -r -s 19200 ttyS1 mgetty -r -x 9 -s 19200 ttyS1 -----------------------------------------------------------------------


Enable/disable the display of messages on the screen using the comamnd "write" Sintassi: mesg [y|n] -----------------------------------------------------------------------


????? -----------------------------------------------------------------------


????? -----------------------------------------------------------------------


A small version of getty with no modem or serial line support to reduce memory use. Do not use any configuration file. Sintassi: mingetty [options] [virtual console] Opzioni: --noclear Do not clear the screen before the login --long-hostname Display the complete computer name at the login prompt Esempi: mingetty tty1 -----------------------------------------------------------------------


Create one or more directories Sintassi: mkdir [options] < directory > ... Opzions: "-m | --mode= " Define permission "-p | --parents" Create the full-tree of parent dirs not only the target child "--verbose" Verbose -----------------------------------------------------------------------


Create one or more FIFO (named pipe) mkfifo [options] < file > Opzioni: "-m < mode > | --mode=< mode >" Define Permissions -----------------------------------------------------------------------

mkfs, mkfs.ext2, mkfs.msdos, mke2fs

Make an ext2 file system on the specified device Syntax for ext2 fs : mke2fs [options] < device > [dimension in blocks] Syntax for dos fs : mkedos [options] < device > [dimension in blocks] General Syntax : mkfs [ -t < fs type > ] [options] < device > [dimension in blocks] Opzioni: "-b < block size >" "-c" Check badblocks "-i " "-q" Silent "-S" Write only the superbock (Latest recover re