|
| ||||||||||
| Tags: command, linux |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| ||||
| ||||
| Basic Linux Commands 2
Usage Code: mkdir [OPTION] DIRECTORY Create the DIRECTORY/IES, if they do not already exist. Mandatory arguments to long options are mandatory for short options too. -m, mode=MODE set permission mode (as in chmod), not rwxrwxrwx - umask -p, parents no error if existing, make parent directories as needed -v, verbose print a message for each created directory -help display this help and exit -version output version information and exit cd - change directories Usage Use cd to change directories. Type cd followed by the name of a directory to access that directory.Keep in mind that you are always in a directory and can navigate to directories hierarchically above or below. Code: cd [folder name or complete path] Usage Type mv followed by the current name of a directory and the new name of the directory. Code: mv testdir newnamedir |
|
#2
| ||||
| ||||
| Re: Basic Linux Commands 2 pwd - print working directory Usage will show you the full path to the directory you are currently in. This is very handy to use, especially when performing some of the other commands on this page rmdir - Remove an existing directory Code: rm -r chown - change file owner and group Usage Code: chown [OPTION] OWNER[:[GROUP]] FILE chown [OPTION] :GROUP FILE chown [OPTION] --reference=RFILE FILE Change the owner and/or group of each FILE to OWNER and/or GROUP. With --reference, change the owner and group of each FILE to those of RFILE. -c, changes like verbose but report only when a change is made -dereference affect the referent of each symbolic link, rather than the symbolic link itself -h, no-dereference affect each symbolic link instead of any referenced file (useful only on systems that can change the ownership of a symlink) -from=CURRENT_OWNER:CURRENT_GROUP change the owner and/or group of each file only if its current owner and/or group match those specified here. Either may be omitted, in which case a match is not required for the omitted attribute. -no-preserve-root do not treat `/' specially (the default) -preserve-root fail to operate recursively on `/' -f, -silent, -quiet suppress most error messages -reference=RFILE use RFILE's owner and group rather than the specifying OWNER:GROUP values -R, -recursive operate on files and directories recursively -v, -verbose output a diagnostic for every file processed The following options modify how a hierarchy is traversed when the -R option is also specified. If more than one is specified, only the final one takes effect. -H if a command line argument is a symbolic link to a directory, traverse it -L traverse every symbolic link to a directory encountered -P do not traverse any symbolic links (default) |
|
#3
| ||||
| ||||
| Re: Basic Linux Commands 2 chmod - change file access permissions Usage Code: chmod [-r] permissions filenames u - User who owns the file. g - Group that owns the file. o - Other. a - All. r - Read the file. w - Write or edit the file. x - Execute or run the file as a program. Numeric Permissions: CHMOD can also to attributed by using Numeric Permissions: 400 read by owner 040 read by group 004 read by anybody (other) 200 write by owner 020 write by group 002 write by anybody 100 execute by owner 010 execute by group 001 execute by anybody ls - Short listing of directory contents -a list hidden files -d list the name of the current directory -F show directories with a trailing '/' executable files with a trailing '*' -g show group ownership of file in long listing -i print the inode number of each file -l long listing giving details about files and directories -R list all subdirectories encountered -t sort by time modified instead of name |
|
#4
| ||||
| ||||
| Re: Basic Linux Commands 2 cp - Copy files Code: cp myfile yourfile Code: cp -i myfile yourfile Code: cp -i /data/myfile Code: cp -dpr srcdir destdir ln - Creates a symbolic link to a file. Code: ln -s test symlink locate - A fast database driven file locator. Code: slocate -u more - Allows file contents or piped output to be sent to the screen one page at a time less - Opposite of the more command cat - Sends file contents to standard output. This is a way to list the contents of short files to the screen. It works well with piping. whereis - Report all known instances of a command wc - Print byte, word, and line counts |
|
#5
| ||||
| ||||
| Re: Basic Linux Commands 2 bg bg jobs Places the current job (or, by using the alternative form, the specified jobs) in the background, suspending its execution so that a new user prompt appears immediately. Use the jobs command to discover the identities of background jobs. Code: cal month year cat files - Prints the contents of the specified files. clear - Clears the terminal screen. cmp file1 file2 - Compares two files, reporting all discrepancies. Similar to the diff command, though the output format differs. diff file1 file2 - Compares two files, reporting all discrepancies. Similar to the cmp command, though the output format differs. dmesg - Prints the messages resulting from the most recent system boot. fg fg jobs - Brings the current job (or the specified jobs) to the foreground. file files - Determines and prints a description of the type of each specified file. Code: find path -name pattern -print finger users - Prints descriptions of the specified users. free - Displays the amount of used and free system memory. |
|
#6
| ||||
| ||||
| Re: Basic Linux Commands 2 ftp hostname Opens an FTP connection to the specified host, allowing files to be transferred. The FTP program provides subcommands for accomplishing file transfers; see the online documentation. head files - Prints the first several lines of each specified file. ispell files - Checks the spelling of the contents of the specified files. kill process_ids kill - signal process_ids kill -l Kills the specified processes, sends the specified processes the specified signal (given as a number or name), or prints a list of available signals. killall program killall - signal program Kills all processes that are instances of the specified program or sends the specified signal to all processes that are instances of the specified program. mail - Launches a simple mail client that permits sending and receiving email messages. man title man section title - Prints the specified man page. ping host - Sends an echo request via TCP/IP to the specified host. A response confirms that the host is operational. reboot - Reboots the system (requires root privileges). shutdown minutes shutdown -r minutes Shuts down the system after the specified number of minutes elapses (requires root privileges). The -r option causes the system to be rebooted once it has shut down. sleep time - Causes the command interpreter to pause for the specified number of seconds. |
|
#7
| ||||
| ||||
| Re: Basic Linux Commands 2 sort files - Sorts the specified files. The command has many useful arguments; see the online documentation. split file - Splits a file into several smaller files. The command has many arguments; see the online documentation sync - Completes all pending input/output operations (requires root privileges). telnet host - Opens a login session on the specified host. top - Prints a display of system processes that's continually updated until the user presses the q key. traceroute host - Uses echo requests to determine and print a network path to the host. uptime - Prints the system uptime. w - Prints the current system users. wall - Prints a message to each user except those who've disabled message reception. Type Ctrl-D to end the message. |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "Basic Linux Commands 2" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Linux console commands | Bansi_WADIA | Operating Systems | 5 | 22-01-2010 02:46 AM |
| Man page commands in linux | Crespin | Operating Systems | 5 | 31-12-2009 02:14 AM |
| Linux and Linux Commands Books | Coldman | Software Development | 5 | 22-12-2009 01:14 PM |
| Need Basic Dos commands for Commands prompt | JangoRap | Operating Systems | 5 | 29-06-2009 12:07 PM |
| Linux Basic Commands | Solomon | Operating Systems | 5 | 30-01-2009 01:20 PM |