Some skills I have learned from my own practices 1

Source: Internet
Author: User
Locatexboingtesttar-cvfxboing.tar-Ttestgzipxboing.tarcpxboing.tar.gzmntusbtheabovecommandcancopyasoftwarewhichhavebeeninstalledonsomeonesystemtoyourownsystem ^-^ #! Binshforfnamein *; dotmp 'echo $ fname | t

Locate xboing test tar-cvf xboing.tar-T test gzip xboing.tar cp xboing.tar.gz/mnt/usb the above command can copy a software which have been installed on someone system to your own system ^-^ #! /Bin/sh for fname in *; do tmp = 'echo $ fname | t

Locate xboing> test
Tar-cvf xboing.tar-T test
Gzip xboing.tar
Cp xboing.tar.gz/mnt/usb
The above command can copy a software which have been installed on someone system to your own system ^-^
#! /Bin/sh
For fname in *; do
Tmp = 'echo $ fname | tr [a-z] [A-Z] '# note, tr can't act like this 'tr fname [a-z] [A-Z]'
# It must run as this 'tr # So, if you want rename a file list, you must redirect tr's stdin to some command's stdout
Mv $ fname $ tmp
Done
The above code cost me lots of time! ^-^
It can rename file name in your current dir from lowercase to upper case
This is very useful while you untar a tarball which is tared in a dos/windows system

Date + % m-% d-% Y
The above cmd can output current time in MM-DD-YYYY format

Tr-s '/N' The above cmd will del all empty line

Ls {*. wav, *. mp3}
The above cmd list all mp3 or wav files in current dir
Ls {*. wav, *. mp3, *. log}
The above cmd list all mp3 or wav or log files in current dir

If [$ (date + % H)-ge 22]; then
Echo whp; else
Echo dll; fi
You can do diffrent work in diffrent time

Grep 'd/+ 'test.txt
Grep 'd/{1,/} 'test.txt
The above cmd match lines which contain one or more 'D'

If you want to use xpdf, you must install/slackware/l/lesstif

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.