Public bug reported: I notice this issue today (2010/08/19) with Ubuntu-10.04 which really puzzles me. Ubuntu-10.04 was working fine until now.
Shell redirection creates junk characters in file names. Here is an example: $ mkdir /tmp/test $ cd /tmp/test $ echo > abc $ mv abc def mv: cannot stat `abc': No such file or directory # Clearly this is wrong, I the 'mv' command should have succeeded. $ ls abc # notice there there is a blank in front of the file name?!? $ ls -Q " abc" Piping command is also broken: $ ls | cat cat: command not found I though it might be a bug in bash, so I tried with another shell (zsh) and the problem is identical. So is this a kernel problem or a file system issue? Here is more info: $ uname -a Linux pel-laptop 2.6.32-24-generic #39-Ubuntu SMP Wed Jul 28 06:07:29 UTC 2010 i686 GNU/Linux $ mount ... /dev/sda1 on / type ext4 (rw,errors=remount-ro) $ locale LANG=en_US.utf8 LC_CTYPE="en_US.utf8" LC_NUMERIC="en_US.utf8" LC_TIME="en_US.utf8" LC_COLLATE="en_US.utf8" LC_MONETARY="en_US.utf8" LC_MESSAGES="en_US.utf8" LC_PAPER="en_US.utf8" LC_NAME="en_US.utf8" LC_ADDRESS="en_US.utf8" LC_TELEPHONE="en_US.utf8" LC_MEASUREMENT="en_US.utf8" LC_IDENTIFICATION="en_US.utf8" LC_ALL= If I change the locale to C, I see this: $ export LANG=C $ ls ??abc And with C locale, piping works so I can pipe into sed to see what kind of junk char are in the file name: $ ls | sed l \302\240abc$ abc However, redirecting is still broken with C locale: $ echo > yyy $ ls ??abc ??yyy I have no idea why those characters \302\240 end up in the file name when redirecting. Right now, I pretty much can't do anything in the shell anymore so bug is severe. ProblemType: Bug DistroRelease: Ubuntu 10.04 Package: linux-tools-2.6.32-24 (not installed) Regression: Yes Reproducible: Yes ProcVersionSignature: Ubuntu 2.6.32-24.39-generic 2.6.32.15+drm33.5 Uname: Linux 2.6.32-24-generic i686 NonfreeKernelModules: nvidia AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.21. Architecture: i386 ArecordDevices: **** List of CAPTURE Hardware Devices **** card 0: Intel [HDA Intel], device 0: CONEXANT Analog [CONEXANT Analog] Subdevices: 1/1 Subdevice #0: subdevice #0 AudioDevicesInUse: USER PID ACCESS COMMAND /dev/snd/controlC0: pel 1399 F.... pulseaudio CRDA: Error: [Errno 2] No such file or directory Card0.Amixer.info: Card hw:0 'Intel'/'HDA Intel at 0xde300000 irq 22' Mixer name : 'Conexant CX20549 (Venice)' Components : 'HDA:14f15045,103c30bb,00100100' Controls : 18 Simple ctrls : 8 Date: Thu Aug 19 20:35:31 2010 HibernationDevice: RESUME=UUID=b4f4d93a-feab-4fe7-904d-5b955367aff8 InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release i386 (20100429) MachineType: Hewlett-Packard HP Pavilion dv9000 (RY689EA#ABH) ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.32-24-generic root=UUID=24422798-076f-4c7e-8115-69f0029c53ab ro splash ProcEnviron: PATH=(custom, user) LANG=en_US.utf8 SHELL=/bin/bash RelatedPackageVersions: linux-firmware 1.34.1 RfKill: 0: phy0: Wireless LAN Soft blocked: no Hard blocked: yes SourcePackage: linux dmi.bios.date: 02/02/2007 dmi.bios.vendor: Hewlett-Packard dmi.bios.version: F.16 dmi.board.name: 30BD dmi.board.vendor: Quanta dmi.board.version: 66.37 dmi.chassis.type: 10 dmi.chassis.vendor: Quanta dmi.chassis.version: N/A dmi.modalias: dmi:bvnHewlett-Packard:bvrF.16:bd02/02/2007:svnHewlett-Packard:pnHPPaviliondv9000(RY689EA#ABH):pvrRev1:rvnQuanta:rn30BD:rvr66.37:cvnQuanta:ct10:cvrN/A: dmi.product.name: HP Pavilion dv9000 (RY689EA#ABH) dmi.product.version: Rev 1 dmi.sys.vendor: Hewlett-Packard ** Affects: linux (Ubuntu) Importance: Undecided Status: New ** Tags: apport-bug filesystem i386 lucid needs-upstream-testing regression-potential -- shell redirection and pipe create junk character in front of file name https://bugs.launchpad.net/bugs/620620 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs