Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Linux Command Study Notes     - WebLogic 12c Configuration Node Manager Managed Server (Database)

- Oracle 11g contraction table space error ORA-03297: file contains used data beyondrequested RESIZE value (Database)

- C ++ stderr / stdout redirected to a file (Programming)

- Ubuntu 14.04 Boot Repair (Linux)

- Android Sets the system screen brightness (Programming)

- Use Ganglia to monitor your cluster (Server)

- CentOS7 build GlusterFS (Linux)

- Linux file system management partition, format, mount - label mount (Linux)

- Docker improve safety (Server)

- How Linux system password security guarantee (Linux)

- There are three ways to run a Linux operating system from a USB stick (Linux)

- Installation and deployment of Hadoop 2.7.1 on Ubuntu 14.04 LTS (Server)

- Fragment Android developers learning to resolve (Programming)

- Oracle 11g tracking and monitoring system-level triggers to drop misuse (Database)

- Ubuntu set Swap Space Tutorial (Linux)

- BCP importing and exporting large amounts of data Practice (Database)

- Linux common commands: nslookup, ls md5sum, uname, history, etc. (Linux)

- To install the Git and Github under Ubuntu (Linux)

- Compile and install LNMP under CentOS 6.5 (Server)

- Report generation CPU, memory, and input and output ports with the sar command (Linux)

 
         
  Linux Command Study Notes
     
  Add Date : 2018-11-21      
         
         
         
  Basic File Operations

ls, rm, mv, ln

ls

 ls [option] [files]

With no parameters, lists the contents of the current working directory

$ Ls

Lists the contents of the specified directory

ls dir1

Or individual files

ls file1

Options

-a lists all files, including hidden files and directories (beginning.)

-l displays the file name properties and detail in long format

-h to k, m, etc. units substituted for users to read bytes

-F Type of drum to symbolize the number to modify a specific file name

/ table of Contents

* executable file

@ Symbol files (symbolic links)

l command pipeline (named pipes)

= Communication channels (sockets)

 Symbol appended to the file name, you can help us to see at a glance their type, these symbols are not a file name

Part, but ls displayed when added to their own.

-i ask price before filling the file name inode number

-s before the filename raise the number of blocks occupied by the file (1 block typically 1024 bytes)

-R Recursively lists the contents of a directory

-d Lists directory itself, not its contents

 

 

cp [option] files (file | dir)

Do not add parameter indicates copy a file

$ Cp srcfile destfile

Copy multiple files to a directory

$ Cp file1 fle2 file3 dir

-a or -R option, you can copy the entire subdirectories recursively

-p together with the access mode of the source file, the time stamp also be copied to the new file, if your permissions allow, owner of the new file, and also belongs to the group and the old files. If you can not specify the owner of the item, the new file is your knee is the current time, and the access mode is the access mode of the source file with your umask intersection.

-a copy the entire directory tree, and retention relationship special file access mode, symbolic links and hard links.

This option is equivalent to specifying -R (contains special files, including the recursive copy), -p (access mode)

-d (link)

-i interactive mode, before overwriting the destination file, first seek the views of users

-f force replication, timely target file already exists, it will be unconditionally overwritten.

 

mv [option] sources target

Moving and renaming is one thing, move command can also change the file name.

 

mv file1 file2

The file or directory to another directory

mv file1 file2 dir3 dir4 dest_dir

-i interactive mode

-f Force Mobile

 

rm [options] files | dirs

rm (remove) command to delete a file

rm file1 file2 file3

You can also delete the entire directory

rm -r dir1 dir3

 

-i interactive mode

-f Force delete, ignore any error or warning HE

-r recursive call for directory and its content,

 

ln [options] source target

Link link is a reference to another file reference, there ln command established. Divided into two links, break

No connection (symbolic link) to the "path" to indicate another file, wanted the windows shortcuts

Formula (shorcut) or macintosh alias alias

$ Ln -s myfile softlink

If you delete the source file, the symbolic link file does not exist just because the two paths become invalid. On the other hand, hard links (hard link) is the name of a second physical disk file (with terms, hard links point to the same inode). Delete source files and link failure does not cause that you can still access the contents of the source file with hard links.

$ Ln myfile softlink

Symbolic links can span disk partition, because they are only references to the source file path only. But hard links can not, because inode a partition to another partition does not make sense. Objects can make a symbolic link directory, but not hard links, unless you are superuser and using the -d option.

Common options

-s make a symbolic link (the default behavior is to produce a hard link)

-i interactive mode

-f Force mode, unconditionally be covered

-d allow superuser production directory hard links

Object using one of these commands, you can easily find out why a symbolic link

$ Readlink linkname

$ Ls -l linkname

Directory Operations

cd Change the current working directory

pwd Displays the name of the current working directory

basename display the file path in the end portion

Part dirname like the end of the file path outside

mkdir Create a directory

rmdir to delete empty directories

rm -r remove non-empty directory and its contents

 

cd [directory] bash

shell built-in commands
     
         
         
         
  More:      
 
- Construction LVM-based raw device Oracle10g Database on Oracle Linux 5.11 (Database)
- Actual custom yum repository ---- gem commands commonly used parameters (Linux)
- MySQL / MariaDB database master-slave replication (Database)
- Java polymorphism and exception handling (Programming)
- How to Install Puppet in the Ubuntu 15.04 (Server)
- Linux / Raspberry Pi using the following command-line based web browser (Linux)
- Spring multi data source configuration (Programming)
- Linux system last command usage (Linux)
- xCAT deployment (Linux)
- Linux System Getting Started Tutorial: permission to permanently modify the USB device in Linux (Linux)
- MySQL dual master configuration (Database)
- Debian (Wheezy) Install Redmine 2.6 (Programming)
- Find details block device with Linux blkid command (Linux)
- Linux find command usage practices (Linux)
- OpenGL Superb Learning Notes - Vertex Shader example (Programming)
- UNIX how to restrict users by IP Telnet (Linux)
- The most concise Systemd tutorial, just ten minutes (Linux)
- lack of SWAP space during installation of Oracle (Database)
- How to install Hadoop on CentOS7 (Server)
- You really do need to know a variety of programming languages (Programming)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.