无为清净楼资源网 Design By www.qnjia.com

Q:我在树莓派命令行模式下使用mplayer播放单首音乐,因为文件名中含有空格,提示不存在该文件,该如何解决?

[johnwick@raspberrypi~]$sudo mplayer Me like yuh.mp3

MPlayer2 2.0-728-g2c378c7-4+b1 (C) 2000-2017 MPlayer Team

Cannot open file '/root/.mplayer/input.conf': No such file or directory

Failed to open /root/.mplayer/input.conf.

Cannot open file '/etc/mplayer/input.conf': No such file or directory

Failed to open /etc/mplayer/input.conf.

Playing Me.

Cannot open file 'Me': No such file or directory

Failed to open Me.

Playing like.

Cannot open file 'like': No such file or directory

Failed to open like.

Playing yuh.mp3.

Cannot open file 'yuh.mp3': No such file or directory

Failed to open yuh.mp3.

A:mplayerh播放当前目录下单首歌曲的格式为: mplayer [文件名],显然系统认为 Me like yuh.mp3 是三个独立文件

解决办法:①使用引号(英文输入法下)将文件名全部包含: mplayer "Me like yuh.mp3"

linux命令行下文件名中有空格的处理方法

方法②空格前使用连接符号"\"   : mplayer Me\ like\ yuh.mp3     “\”告诉系统后面跟着的字符为原意,不是命令

linux命令行下文件名中有空格的处理方法

参考:linux命令行下进入带空格的文件夹的方法

完毕。

标签:
linux,文件名,空格

无为清净楼资源网 Design By www.qnjia.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
无为清净楼资源网 Design By www.qnjia.com