Terminal Text  $ cd LALALA ~/LALALA $ dir la\ la\ 1 la\ la\ 2 ~/LALALA $    Directory Image    When I use dir command in terminal, the list of file show \ (backslash) to separate their word (see: Terimanal Image). Whereas in the origin, there is no '\' (backslash) (see: Directory Image). How do I change this back to normal?  NB. I think the reason is because of the pwd command on the terminal. After I use the PWD command, this happens.
92926
I've been trying to find the difference between using the dir and ls commands in terminal. I know ls is the traditional UNIX method of viewing the files in a directory, and that dir is the windows command prompt equivalent, but both commands work in terminal.   If I type in dir, it displays the files and folders in the directory, and if I type ls, it does the same, except with content highlighting. Both commands accept options (i.e. ls -a and dir -a both return all files and folders and hidden files.   So does anyone know what the difference is and why both dir and ls are used?
51324
So I finally got my Ubuntu box up and running, ran the LAMP install, and successfully loaded up the apache2 webserver, and php5.  The one thing I didn't want is for Ubuntu during the installation to take one whole 1TB drive that contained a ton of stuff, but it was a backup drive so no biggie.  But now I was transferring pics to the /var/www location and it copied a directory that contains spaces. Terminal seems to hang when I use the rm command, any ideas would be appreciated, thanks guys.
64756
Echoing path in ubuntu returns following colon separated paths,  /home/stack/bin:/home/stack/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin   In these paths at some places there is local while at others .local is used what is the difference between both?
116955
Is there any difference between a directory name such as  mydirectory   and  mydirectory/   I noticed this happens when I execute ls in some directories - some of the directory names have a slash and some don't. This is problematic because if I want to access a file contained in a directory, I may need to add a slash at the end:  vi $mydirectory"/"$myfile   or simply do   vi $mydirectory$myfile
35337
On UNIX-like systems over the years (most relevantly to me, Linux), I've noticed that . (current dir) is never in the $PATH by default.  Why is this?  I recall reading years ago that it was a security problem, but the article I read didn't explain what exactly the problem was.  Is it because someone could leave a malicious version of ls or cp in a directory, and I'd end up running it without realizing it was there?
93109
I have a directory called "foo bar baz blob". How can I  $ cd "foo bar baz blob"   I have tried with quoting (" and ') and with escaping the blanks (\ ). It does not work. Tab-completion does not work either.  I also have to issue commands with filename arguments that contain spaces. How do I do that? Even MidnightCommander (mc) fails in doing this.  EDIT  Over one year later, I finally found the source of my problem. I have overloaded the builtin cd with a function that automatically lists the files of the changed directory:   $ type cd cd ist eine Funktion. cd ()  {      if builtin cd $1; then         ls;     fi }  $ cd Interner\ Speicher/ bash: cd: Interner: Datei oder Verzeichnis nicht gefunden  $ builtin cd Interner\ Speicher/  $ pwd /run/user/1000/gvfs/mtp:host=%5Busb%3A002%2C018%5D/Interner Speicher  $ ls Alarms   DCIM      Movies  Notifications  Podcasts   SmsContactsBackup Android  Download  Music   Pictures   Ringtones   The solution is easy: I just have to put double quotes around the $1:  if builtin cd "$1"; then   Ooof. Thank you.
18131
Test environment:  $ mkdir testdir $ cd testdir $ echo | tee "file  name"   Now, ls will print file?name (under Ubuntu GNU bash, at least), while ls | cat will print file and name in separate lines.  What I'd like to achieve is, print file?name with the  piped version, so something like  $ something ls | cat` or `ls | something | cat` or `ls | something cat   In other words, how to fool a command like ls here into thinking, it has a TTY, when it does not, in the shell?  Note: ls is just an example program here, I'm looking for generic solution, not program specific like ls -q | cat would be.
74228
Possible Duplicate:          Most commands I use in linux behave exactly the same whether I include the trailing slash / character on the end of a directory name or not.  For example:  ls /home/cklein ls /home/cklein/  cp foo bar cp foo/ bar/   When does this trailing slash matter?  What is the semantic meaning of the trailing slash?
46580
I'm trying to escape the space char for a path in Bash, but neither using a  or  works.  .sh script:  ROOT="/home/hogar/Documents/files/" FILE=${ROOT}"bdd.encrypted" DESTINATION="/home/hogar/Ubuntu\ One/folder"  mv ${FILE} ${DESTINATION}   After execute the script (./file) this is the result:  mv: target 'One/folder' is not a directory   Why does the mv command split the string, and how do I stop this from happening?
93581
I have no idea how to correctly define my graphics path on . In a Linux terminal my folder location would look like: \home\Libraries\Documents\paperimages  I'm sorry if this is asked on the usual, but I cannot find any real substantial help online.
84524
Suppose my file name is äbc def  When I type in the terminal like cat ¨abc def¨ it shows error. Can anybody tell me how to print this file that has spaces in between the name.
54667
I just wanted to ask whether there is any command which would work on common shells (bash, dash, kornshell)? It is supposed to check if the line variable contains any part of the path.  if [[ $line =~ "$PWD"$ ]] ;then
86602
Sometimes I see the following command:   find . -name  * -exec ls -a {} \;   I was asked to execute this.  What does {} \; mean here?
8187
Writing my first script so I'm sure this is a basic question, but can someone please explain to me why I can:  cd ~ cd bin cd ~/bin cd 'bin'   But not  cd '~' cd '~/bin'   I need to cd to a directory path with a space in one of the directory names, so I need the quotes (it's Windows Program Files under wine). I can get around it with two cd commands, but why can't I put ~ in quotes?  If I type cd '~' (or cd "~") I get:  bash: cd: ~: No such file or directory
64638
I got a shell script and inside I got the command as below #!/bin/sh sh ../jboss/bin/standalone.sh --server-config=standalone-full.xml -Djboss.node.name=node1 -b 0.0.0.0 -bmanagement 0.0.0.0  How can I break the line to multiple lines for better understanding and management #!/bin/sh sh ../jboss/bin/standalone.sh    --server-config=standalone-full.xml   -Djboss.node.name=node1   -b 0.0.0.0   -bmanagement 0.0.0.0  Tried with backslash at the end of each line and it doesnt work.
91419
I'm trying to tidy-up my photos which are, for various historic reasons, scattered all over my system. To enable me to make a start on this task, I've been trying to use the command line to construct a list of all directories that contain one or more jpg files.  I'm certain that I don't have to be concerned about looking for other image file formats, but I do have to allow for jpg appearing in upper and lower case.  I'd like each directory name to appear only once in the final list.  To provide an example, if I have the following directories each of which contain one or more jpg or JPG files....  ~Mike/Pictures ~Mike/Pictures/London/Olympics ~Mike/Pictures/London ~Mike/Pictures/London/Holiday ~Mike/Photos ~Mike/Family History/Swaine   I'd like the results to appear with each directory listed only once - irrespective of the number of image files it might contain - preferably sorted and then written to a file  ~Mike/Family History/Swaine ~Mike/Photos ~Mike/Pictures ~Mike/Pictures/London ~Mike/Pictures/London/Holiday ~Mike/Pictures/London/Olympics   My command line skills are just not up to this!  I can use a lot of the simpler forms of single commands, but once they get complex and/or have to be piped things tend to go wrong.
3794
I find that I often do the following:  %&gt; cd bla/bla %&gt; ls   I would like it that whenever I cd into a directory it automatically does an ls.  I fiddled with my .bashrc for a while, but couldn't figure out how to make it happen.