Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Linux Command Study Notes     - 10046 trace only open for a particular SQL statement (Database)

- ASP.NET 5 (vNext) Linux deployment (Server)

- Getting Started with Linux system to learn: How do I know which processes are running on the CPU core (Linux)

- Single list summarizes the basic operation (Programming)

- How to install and use the Snort in Ubuntu 15.04 (Linux)

- Linux Open coredump (Linux)

- Advanced Linux security settings (Linux)

- installation of Vim plugin YouCompleteMe under Ubuntu 15.04 (Linux)

- Android components series Activity (Programming)

- ORA-01157 & ORA-01110 Troubleshooting (Database)

- httpd-2.4 feature (Server)

- Linux boot process (Linux)

- Find details block device with Linux blkid command (Linux)

- Advanced permissions Linux file system settings (Linux)

- Delay for the specified IP port analog network to send and receive packets on Linux (Linux)

- To compile and install MySQL 5.7.7 RC under CentOS 7.1 (Database)

- Ubuntu install Wireshark (Linux)

- Linux configuration Samba server (Server)

- Hackers is how the invasion and control of Things devices? (Linux)

- Spring next ActiveMQ combat (Programming)

 
         
  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:      
 
- Oracle 11g RAC automatically play GI PSU patch (11.2.0.4.8) (Database)
- To explore the caching mechanism for Android ListView (Programming)
- The Objects in JavaScript (Programming)
- CentOS 6.5 / Linux restart network card being given Determining if ip address x.x.x.x is already in use (Linux)
- Linux kernel modules related to the management Comments (Linux)
- Java in several ways of using MongoDB (Programming)
- Java development environment to build under Ubuntu (Linux)
- Spark read more HBase tables a RDD (Server)
- How to install Virtualbox 4.3.20 in Ubuntu 14.04 (Linux)
- Golang use Oracle database on Ubuntu 14.04 (Linux)
- Linux console password solution (Programming)
- Network Security Basics Linux command (Linux)
- Redis application of Sina Weibo (Database)
- Ubuntu 12.04 commonly use shortcuts finishing Share (Linux)
- Questions about Linux compiler u-boot (Programming)
- crontab cause CPU exception Analysis and Processing (Linux)
- Configuring DNS process under CentOS 6.5 (Server)
- Talking about the implementation and the JVM garbage collection mechanism (Programming)
- Taught you how to build your own VPS server (Server)
- Spring + Log4j + ActiveMQ remote logging - Analysis of combat (Server)
     
           
     
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.