Home IT Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Linux redirection and piping     - SecureCRT use the configuration detailed tutorial (Linux)

- Python substring format (Programming)

- Linux for enterprises to build a firewall (Linux)

- Linux ban single-user mode to enhance system security (Linux)

- Oracle table space create large files (Database)

- sudo command scenario analysis (Linux)

- Add your own kernel and ramfs based on an existing Linux LiveCD (Linux)

- Linux environment installation of rvm and ruby (Linux)

- The correct way to open Xcode - Debugging (Programming)

- Linux partition command (Linux)

- Linux network security strategy (Linux)

- Linux System Getting Started Learning: The Linux log (Linux)

- CentOS RedHat YUM Source Extensions Supplement (including 32-bit, 64-bit) (Linux)

- Linux install and configure Heartbeat (Server)

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

- To compile and install Redis Linux and master-slave replication configuration (Database)

- C ++ based socket communication TCP and UDP (Programming)

- Android Fragment really fully resolve (Programming)

- MongoDB simple replication configuration (Database)

- Install Git on CentOS (Linux)

 
         
  Linux redirection and piping
     
  Add Date : 2017-01-08      
         
       
         
  Standard output redirection

">" Operator: overwrite the destination file contents

linuxhost @ linuxhost: ~ / linuxhost / linux / cmdline $ date> foo
linuxhost @ linuxhost: ~ / linuxhost / linux / cmdline $ cat foo
Fri May 8 09:55:42 CST 2015
">>" Operator: additional output in the target end of the file

linuxhost @ linuxhost: ~ / linuxhost / linux / cmdline $ date >> foo
linuxhost @ linuxhost: ~ / linuxhost / linux / cmdline $ cat foo
Fri May 8 09:55:42 CST 2015
Fri May 8 09:57:02 CST 2015
Redirect standard error

"2>" operator: overwrite the destination file contents

linuxhost @ linuxhost: ~ / linuxhost / linux / cmdline $ ls inexistent_dir 2> ls-error.txt
linuxhost @ linuxhost: ~ / linuxhost / linux / cmdline $ cat ls-error.txt
ls: can not access inexistent_dir: No such file or directory
"2 >>" operator: additional output in the target end of the file

linuxhost @ linuxhost: ~ / linuxhost / linux / cmdline $ ls inexistent_dir 2 >> ls-error.txt
linuxhost @ linuxhost: ~ / linuxhost / linux / cmdline $ cat ls-error.txt
ls: can not access inexistent_dir: No such file or directory
ls: can not access inexistent_dir: No such file or directory
The standard output and standard error is redirected to the same file

"&>" Operator: overwrite the destination file contents

linuxhost @ linuxhost: ~ / linuxhost / linux / cmdline $ date &> foo
linuxhost @ linuxhost: ~ / linuxhost / linux / cmdline $ cat foo
Fri May 8 10:16:12 CST 2015
linuxhost @ linuxhost: ~ / linuxhost / linux / cmdline $ ls inexistent_dir &> foo
linuxhost @ linuxhost: ~ / linuxhost / linux / cmdline $ cat foo
ls: can not access inexistent_dir: No such file or directory
"& >>" Operator: additional output in the target end of the file

linuxhost @ linuxhost: ~ / linuxhost / linux / cmdline $ echo 'hello world'> foo
linuxhost @ linuxhost: ~ / linuxhost / linux / cmdline $ date & >> foo
linuxhost @ linuxhost: ~ / linuxhost / linux / cmdline $ ls inexistent_dir & >> foo
linuxhost @ linuxhost: ~ / linuxhost / linux / cmdline $ cat foo
hello world
Fri May 8 10:25:24 CST 2015
ls: can not access inexistent_dir: No such file or directory


Standard input redirection

"<" Operator

linuxhost @ linuxhost: ~ / linuxhost / linux / cmdline $ echo 'hello world'> foo
linuxhost @ linuxhost: ~ / linuxhost / linux / cmdline $ cat hello world
pipeline

"|" Operator


linuxhost @ linuxhost: ~ / linuxhost / linux / cmdline $ ls / usr / bin | grep '^ zip'
zip
zipcloak
zipgrep
zipinfo
zipnote
zipsplit
     
         
       
         
  More:      
 
- Java thread pool: ExecutorService, Executors (Programming)
- Merge Sort (Programming)
- ImageMagick Tutorial: How to cut images in Linux command line (Linux)
- Quick paging ROW_NUMBER conducted (Database)
- Why is the ibdata1 file growing in MySQL? (Database)
- About Linux backdoor (Linux)
- Using Vagrant to build multi-platform environment (Server)
- After installing minimize RHEL / CentOS 7 need to do some things (Linux)
- Tsunami-udp accelerated network transmission (Linux)
- MySQL log from the library than the main library (Database)
- Vim highlight lookup operation (Linux)
- Understanding the Linux load average on other UNIX-Like systems (Linux)
- exp / imp Export Import version of the problem and the ORA-6550 error (Database)
- Depth understanding of the use of Spring Redis (Programming)
- Compare Oracle MySQL (ICP) index condition pushdown is described (Database)
- Experience PHP 7.0 on CentOS 7.x / Fedora 21 (Server)
- Linux Shell Scripting Interview Question (Linux)
- Linux Desktop allows exceptionally different launch applications (Linux)
- To install minimize RHEL / CentOS 7 (Linux)
- RHEL7 unattended automatic installation DHCP + TFTP + SYSLINUX + TFTP + Kickstart (Linux)
     
           
     
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.