List file in current folder:
ls -al
total 92
drwxr-xr-x 2 debian debian 77824 Oct 28 12:31 .
drwxrwxrwt 27 root root 4096 Oct 28 12:35 ..
-rw-r--r-- 1 debian debian 31 Oct 28 12:23 '伪å'$'\302\205\302\203''ç´ .txt'
-rw-r--r-- 1 debian debian 13 Oct 28 12:22 'æµ'$'\302\213''é'$'\302\207\302\217''.txt'
-rw-r--r-- 1 debian debian 2061 Oct 23 22:29 conf.py
There are three files in the current folder ,the first two files are special,and the first one not only contains special character but also blank space in its filename.
Now print them with sed:
ls -al |sed -n '1,6p'
total 92
drwxr-xr-x 2 debian debian 77824 Oct 28 12:31 .
drwxrwxrwt 26 root root 4096 Oct 28 12:36 ..
-rw-r--r-- 1 debian debian 31 Oct 28 12:23 伪å
ç´ .txt
-rw-r--r-- 1 debian debian 13 Oct 28 12:22 æµé.txt
-rw-r--r-- 1 debian debian 2061 Oct 23 22:29 conf.py
How can fix it?