Linux Server FAQs

Source: Internet
Author: User

1, CentOS filename display garbled

As shown below:

650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M02/A4/2A/wKioL1mmDbnA3E4aAABZEs-hTAg539.png "title=" 01. PNG "alt=" Wkiol1mmdbna3e4aaabzes-htag539.png "/>

The reason is:

The file name of Windows Chinese encoding default is GBK, compressed or uploaded, the file name will also be GBK encoding, and Linux default file name encoded as UTF8, because of inconsistent encoding, resulting in file name garbled problem, to solve this problem requires the file name transcoding.

Processing method:

Yum Install Convmv–y

Convmv-f gbk-t Utf-8-R--notest/public/ftp/onewaveftp/

Common parameters:

-R recursive processing of subfolders

-F from

-T to

–notest real operation, by default it does not do real operation of the file

--nosmart if it's already utf-8 ignored

–list display of all supported encodings

–unescap can be escaped, such as to turn%20 into a space

-I interactive mode (asking for each conversion to prevent mis-operation)

There are many handy gadgets to convert your code under Linux:

Text content conversion Iconv

File name Conversion CONVMV

MP3 Label Conversion Python-mutagen

2. Configure the Yum source

2.1. Configure the local Yum repository (take centos5.x as an example)

# Load Storage Volumes

mkdir/pyjvol/

Mount-t NFS 10.10.10.31:/pyjvol/pyjvol/

# load the required mirrors

Mount-o loop/pyjvol/smb/share/software/system/centos/centos-5.2-i386-bin-dvd.iso/mnt

Configuring the Yum Source

cd/etc/yum.repos.d/

MV Centos-base.repo{,.ori}

Vim Centos5.repo

[Base]

name=centos5.2

Baseurl=file:///mnt

Enabled=1

Gpgcheck=0

Yum Clean All

Yum Makecache

3. Mount

3.1, directly under the Cenotos mount ISO file

Mount-o loop/pyjvol/smb/share/software/system/centos/centos-6.5-i386-bin-dvd1.iso/cdrom/

/pyjvol/smb/share/software/system/centos/centos-6.5-i386-bin-dvd1.iso:iso file

/cdrom/: Mount point

4, Linux processing file name contains spaces in the problem

Excerpt from: http://blog.csdn.net/rogerzhanglijie/article/details/44563605

There are currently two folders

[email protected] onewaveftp]# LL

Total 8

drwxrwxrwx 2 777 root 4096 Nov new Folder (2)

drwxrwxrwx 2 777 root 4096 Nov Liaoning Home Width

Execute Next Statement

[[email protected] onewaveftp]# for i in ' ls ';d o echo $i; echo;d One

New Folder

(2)

Liaoning Home

Wide

As you can see, a file with a space is treated as a two-part, apparently unreasonable

We're going to put this in front of the For loop.

[email protected] onewaveftp]# ifs=$ (echo-en "\n\b") ; For i in ' ls ';d o echo $i;d One

New Folder (2)

Liaoning Home width

Re-execute

You can see that the problem is resolved.


This article is from the "Chase Dream" blog, please be sure to keep this source http://sihua.blog.51cto.com/377227/1961007

Linux Server FAQs

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.