I have visited usr/bin directory, but there's no file called cat. How can I find where cat file is stored? I also used Linux global search which did not work. Thanks
83069
For example, I have git installed on my system. But I don't remember where I installed it, so which command is fit to find this out?
11967
I need to know how the directory name in order to type it out in the terminal. How do I access the names of directories?   Windows Explorer used to have a title bar with the full path. Can someone please help me figure out how to see the full path of a certain file?
100477
So by any other command the executable file exists, yet when I try to execute it, it claims it is not there.  It is not a special character in the name because I renamed it though a "cat". And it seems to be a binary for the correct architecture... "seems", I guess the question is, what else throws tat error message BESIDES... the file not being there, because it obviously IS!  ldd xls      linux-gate.so.1 =&gt;  (0xb77bc000)     libQtGui.so.4 =&gt; /usr/lib/i386-linux-gnu/libQtGui.so.4 (0xb6cc2000)     libpng12.so.0 =&gt; /lib/i386-linux-gnu/libpng12.so.0 (0xb6c98000)     libSM.so.6 =&gt; /usr/lib/i386-linux-gnu/libSM.so.6 (0xb6c8f000)     libICE.so.6 =&gt; /usr/lib/i386-linux-gnu/libICE.so.6 (0xb6c76000)     libXrender.so.1 =&gt; /usr/lib/i386-linux-gnu/libXrender.so.1 (0xb6c6d000)     libfreetype.so.6 =&gt; /usr/lib/i386-linux-gnu/libfreetype.so.6 (0xb6bd1000)     libfontconfig.so.1 =&gt; /usr/lib/i386-linux-gnu/libfontconfig.so.1 (0xb6b9b000)     libXext.so.6 =&gt; /usr/lib/i386-linux-gnu/libXext.so.6 (0xb6b88000)     libX11.so.6 =&gt; /usr/lib/i386-linux-gnu/libX11.so.6 (0xb6a50000)     libm.so.6 =&gt; /lib/i386-linux-gnu/i686/cmov/libm.so.6 (0xb6a2a000)     libQtSql.so.4 =&gt; /usr/lib/i386-linux-gnu/libQtSql.so.4 (0xb69ea000)     libQtCore.so.4 =&gt; /usr/lib/i386-linux-gnu/libQtCore.so.4 (0xb6704000)     libz.so.1 =&gt; /lib/i386-linux-gnu/libz.so.1 (0xb66ea000)     libgthread-2.0.so.0 =&gt; /usr/lib/i386-linux-gnu/libgthread-2.0.so.0 (0xb66e7000)     libglib-2.0.so.0 =&gt; /lib/i386-linux-gnu/libglib-2.0.so.0 (0xb65ea000)     libgobject-2.0.so.0 =&gt; /usr/lib/i386-linux-gnu/libgobject-2.0.so.0 (0xb6598000)     librt.so.1 =&gt; /lib/i386-linux-gnu/i686/cmov/librt.so.1 (0xb658f000)     libpthread.so.0 =&gt; /lib/i386-linux-gnu/i686/cmov/libpthread.so.0 (0xb6575000)     libdl.so.2 =&gt; /lib/i386-linux-gnu/i686/cmov/libdl.so.2 (0xb6571000)     libstdc++.so.6 =&gt; /usr/lib/i386-linux-gnu/libstdc++.so.6 (0xb6485000)     libgcc_s.so.1 =&gt; /lib/i386-linux-gnu/libgcc_s.so.1 (0xb6468000)     libc.so.6 =&gt; /lib/i386-linux-gnu/i686/cmov/libc.so.6 (0xb6305000)     libaudio.so.2 =&gt; /usr/lib/i386-linux-gnu/libaudio.so.2 (0xb62ea000)     libuuid.so.1 =&gt; /lib/i386-linux-gnu/libuuid.so.1 (0xb62e4000)     libexpat.so.1 =&gt; /lib/i386-linux-gnu/libexpat.so.1 (0xb62ba000)     libxcb.so.1 =&gt; /usr/lib/i386-linux-gnu/libxcb.so.1 (0xb6297000)     /lib/ld-lsb.so.3 =&gt; /lib/ld-linux.so.2 (0xb77bd000)     libpcre.so.3 =&gt; /lib/i386-linux-gnu/libpcre.so.3 (0xb6258000)     libffi.so.5 =&gt; /usr/lib/i386-linux-gnu/libffi.so.5 (0xb624f000)     libXt.so.6 =&gt; /usr/lib/i386-linux-gnu/libXt.so.6 (0xb61f1000)     libXau.so.6 =&gt; /usr/lib/i386-linux-gnu/libXau.so.6 (0xb61ee000)     libXdmcp.so.6 =&gt; /usr/lib/i386-linux-gnu/libXdmcp.so.6 (0xb61e8000)   uname -m (Also, my distribution is Debian wheezy.)  i686   file xls  xls: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV),       dynamically linked (uses shared libs), for GNU/Linux 2.6.15,      BuildID[sha1]=0xa9786f61b371a683ae4306792f95e0636c288883, not stripped   ls -ld xls  -rwxr-xr-x 1 root root 4634064 May 20 14:35 xls   cat  root@pc170:# cat xls &gt; zls root@pc170:# ./zls -su: ./zls: Permission denied root@pc170:# chmod +x zls root@pc170:# ./zls -su: ./zls: No such file or directory   time  root@pc170:# time ./zls -su: ./zls: No such file or directory  real    0m0.002s user    0m0.000s sys     0m0.000s
109946
Say I have PATH="home/bob/bin:/usr/bin".  I am writing a bash script /home/bob/bin/foo that will do some munging and then call /usr/bin/foo.  Of course I want to be able to use this script on different systems which have different path structures.  In practice the real foo might be in many different places, so I want to just find it from the PATH.  My new foo script is on my path too, so I can't just call foo, that will result in a recursive call.  Is there an easy way of doing this in a bash script? (Other than looping through elements of PATH and doing the search manually?)
110080
I'm developing some scripts. One for the  that popped in Ubuntu 16.04 even though pcspkr is blacklisted. Another to fix a  where sound switches off from TV to the laptop.  What is the best directory to put my bash scripts in?  I've searched the Q&amp;A database but I get a bunch of different answers for a bunch of different scenarios.  /usr/local has been recommended by one person because it's in the PATH$. Is that the right thing to do?  Thank you for your advice.    Even though I accepted below answer over a year ago, I ended up using:   /usr/local/bin for scripts needing sudo powers /home/me/bin for scripts running at user level   After creating directory /home/me/bin you need to log out and in again for it to get into your PATH.
65564
Why does Ubuntu create a file ending in ~ for every file I create with a text editor ?   Creating a file with a text editor like GNU Emacs, say myfile, another file called myfile~ is also created. Why is this superfluous file created ? Using cat on it displays nothing.  Thanks,
55378
I wanted to put my work files (code) in /usr/local/src, but I think it's already a folder that has some other semantic meaning.  What is that? Should I put source code there, or is there a better place?  Edit - I am the sole user and admin of the machine, and I don't want to use my home directory because it's on an NFS drive.
116944
My /usr folder needs to get moved to a new partition. How can I do this without erasing the contents?  Can this be done while Ubuntu is running, or do I need to use the LiveCD for this?
28636
I read this up on this website and it doesn't make sense.       When UNIX was first written, /bin and   /usr/bin physically resided on two   different disks: /bin being on a   smaller faster (more expensive) disk,   and /usr/bin on a bigger slower disk.   Now, /bin is a symbolic link to   /usr/bin: they are essentially the   same directory.   But when you ls the /bin folder, it has far less content than the /usr/bin folder (at least on my running system).  So can someone please explain the difference?
83889
I have an older version of Git installed at:  /usr/bin/   I recently downloaded a newer version to:  /usr/local/bin   When I type:  which git   I get the location of the old version. I believe that this is just because /usr/bin/ appears before /usr/local/bin in my $PATH variable and so the older version of git is 'found' first.   To test this, I renamed the older version of git to "git_old". Now when I type:  which git   I get the location of the newer version, as expected. But when I type:  git --version   I get the following error:  -bash: /usr/bin/git: No such file or directory   I'm just wondering why my computer is going back to looking in the old location for Git?
70508
Is there a way of creating a filesystem object akin to this:  mknod files p cat file1 file2 ... fileN &gt; files   but such that it can be seeked in, as if it were a regular file?
84067
How can I find the files that were stored on my flash drive before I installed Ubuntu to it?   Edit: No, I didn't format it, my files are still on the flash drive root. I just need to know how to access them there.
86631
Non existing file  $ ls file_not_exists.txt ls: cannot access file_not_exists.txt: No such file or directory $ echo &lt;&gt; file_not_exists.txt  $ ls file_not_exists.txt  file_not_exists.txt $ cat file_not_exists.txt $   File with content  $ cat temp.txt  asdf $ echo temp.txt  temp.txt $ echo &lt;&gt; temp.txt   $ cat temp.txt  asdf    If the file does not exist, echo &lt;&gt; file_not_exists.txt will create a new file. So I think &gt; works (redirecting the empty output into a newly created file). But if there is something in the file (like temp.txt), why it is not emptied by echo &lt;&gt; temp.txt?
46123
Using Ubuntu 11.10, I accidentally deleted a file that was approximately 700 MB. I tried to find it in the in following locations, but couldn't:  /home/user/.local/share /home/user/ &lt;-- there was no folder .Trash /home/user/Desktop/ &lt;-- there was no folder .Trash   So where did .Trash go in Ubuntu 11.10 onward? I use the Gnome environment.
99279
I'd like to find where a file (with a partially-known filename) is in the file system.  I'd like to know how to do this from the command line, rather than using a GUI utility.  In Windows, I'd run the following:  cd /d C:\ dir *filename* /s   What's the Linux equivalent?
73460
I am having a hard time grasping what dot-files are or what they are for. Are they directories? How do I navigate to them?  Thank you!
106417
I have a program on my path.  The program runs when executed with a full path specified.  But the program cannot be found when I run it with just its name.    Essentially, I want to understand how the below output is possible, and how to fix it so that my program can actually be found without a full path specified:  root:/usr/local/bin# ./siege **************************************************** siege: could not open /usr/local/bin/etc/siegerc run 'siege.config' to generate a new .siegerc file **************************************************** root:/usr/local/bin# echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games root:/usr/local/bin# siege bash: /usr/bin/siege: No such file or directory root:/usr/local/bin# wtf!?!?   I'm on Ubuntu 12.04 using bash.  Also please note the warning output from siege is not relevant for the purposes of this question, as I am only interested in whether or not the program can be found and invoked.