Results 1 to 3 of 3
Hi All,
Need some work-around for accessing a folder with an "&" in itz name. When I try accessing it, it takes only the first part of the folder_name and ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 08-05-2008 #1Just Joined!
- Join Date
- Aug 2008
- Posts
- 4
Unable to Access a folder with "&" in the name
Hi All,
Need some work-around for accessing a folder with an "&" in itz name. When I try accessing it, it takes only the first part of the folder_name and throws an error as shown below.
Ex : folder name: ./zigibae_&_NAME
ls ./zigibae_&_NAME will give the error
[1] 16690
/usr/local/bin/ls: cannot access ./zigibae_: No such file or directory
bash: _NAME: command not found.
Please help me in this.
Regards,
Anand.Last edited by devils casper; 08-05-2008 at 12:20 PM. Reason: removed formatting tags.
- 08-05-2008 #2Just Joined!
- Join Date
- May 2008
- Location
- Åsnorrbodarna
- Posts
- 8
The '&' character is a special character in many shells (meaning that the preceding command should run as a background process). Therefore you need to escape it by preceding it with a backslash, or enclose the whole string in single quotes:
ls ./zigibae_\&_NAME
or
ls './zigibae_&_NAME'
- 08-05-2008 #3Just Joined!
- Join Date
- Aug 2008
- Posts
- 4
Thanks for a very quick reply and for the solution.


Reply With Quote
