In zsh, when I type ls, it lists the files in the directory, as I would expect it to. However, when I type sl zsh does not ASK whether I want a steam locomotive to roll across my screen. It simply autocorrects to ls with no way to actually run the program sl. This is very annoying, how do I tell zsh that sl really means sl?  It's worth noting that zsh does NOT ask if I want it corrected (unlike the usual auto-correct), it seems to be an alias. However, I can't figure out where the alias is. (which file)
123974
The autocorrection function of zsh is very helpful for me but it does't always gives a proper result.  ~$ sudo vim somefile zsh: correct 'vim' to '.vim' [nyae]?    Yet what I want is something like the a never option that can stop it to correct commands like those forever.  How can I do this?
51665
I was surprised recently when I did something like mv ./* ../somedirectory and found that files like .gitignore were not moved.  I do most of my work in zsh on OS X, and this surprise bit me in bash on CentOS.  I tried bash on OS X and found the same behavior: * does not match dot files.  This seems very undesirable to me, but apparently it's the bash default.  (It may be the zsh default too for all I remember, but I may have changed it years ago in my .zshrc and forgotten it ever worked differently.)  How can I configure bash to behave as I expected: for * to match all files, and not ignore dot files.  In case this is at all unclear, here's how to reproduce it    cd /tmp mkdir {t,d}est touch test/{.,}{1,2,3,4,5,6,7} ls -hal test mv test/* dest ls -hal test     # notice dot files are still there ls -hal dest     # notice only some files were mv'ed
48925
It's hard to search for special characters on google, which is why I'm posting this here.  I recently ran (as root) a mv /tmp/folder/* /* when I meant to run mv /tmp/folder/* ./ Big mistake!  Things broke! A lot of files got mixed up and placed into strange places, none of the normal unix commands worked (ls, dir, cat, etc) and once you logged off, you couldn't ssh back in -- it would give you a prompt, but not accept the old passwords.  Running ls /* shows me that it performs ls on every directory in /. If I tried to draw a parallel, then mv should have simply moved (or copied?) the files to every directory in /. Instead, really weird things happened, and I was just curious what exactly was going on.  More info: The files in /tmp/folder had been transferred from a windows machine, and had been named file (#).txt, where (#) is a number up to two digits, with a space between file and the parenthesis. There were ~40 of these text files.
48702
The output of ls -l command yields the following result:    What is the number field between file permission and owner? i.e. what are those 1, 1, 1, and 2? I checked the --help but that doesn't explain it.  [EDIT]  I thought it was the number of files in a directory but it isn't. See image. "tempFolder" has 3 files but still show a "2"
20456
What is the -alhF flag in ls? I can't find it in the .
59625
while reading about linux file searching I got the following...  To search for files using the * wildcard, replace the unknown string with *, e.g. if you remember only that the extension was .out, type ls *.out  and when I tried the following command on system(ubuntu 14.04 LTS) ..I got   anupam@JAZZ:~$ ls  *.bash*   ls: cannot access  *.bash* : No such file or directory  anupam@JAZZ:~$ ls  .bash*  .bash_history   .bash_logout  .bash_profile  .bashrc  anupam@JAZZ:~$   in the first case why it is showing No such directory ( *.bash* ) and in next case its showing the files ( .bash* )   I am new to this flavor, and according to my automata theory classes (*) means any combination of strings including epsilon(empty),,So why the results are different in both the cases....?
103444
I've added the line   alias ll='ls -l'   to the /etc/bash.bashrc. After a restart, the alias ll from that file affects me, which I checked by commenting out the corresponding alias in my ~/.bashrc (and logging out and back in after that edit). However, it seems to not affect root, as when I type sudo ll, I get "no such command". Shouldn't the alias work in any situation if it's in the system-wide .bashrc?
122179
When I need to find my recently used files, this command:  ls -lt  lists in ascending order (by time), when there are lots files, I need to scroll to the top to see needed files, because won't fit in terminal screen.  After finding out that tac inverses the output, I use: ls -lt dir/ | tac Is there more fun way of doing it, without using external scripts/utils?
111552
So, the question pretty much says it all. I'm on Snow Leopard, and I do a lot of web development, particularly in Rails 3 which makes heavy use of the console.  I've seen some notable bloggers etc. mention Zsh as their preference over Bash, but I don't know what difference it would make.  Could anyone give me a good comparison of what difference there is and what might make one prefer one option or the other?
100382
I'm having trouble with a bash script I want to make  I know ls will list files that are in a directory but I want it to list directories that are in directory1 but NOT in directory2, and then list files in directory2 that are NOT in directory1.  In a feeble attempt, I tried:  ls -al | diff directory1 directory2   Quickly I realized why it didn't work. Can anyone help out a total bash nerd out?
94332
Say I have two paths: &lt;source_path&gt; and &lt;target_path&gt;. I would like my shell (zsh) to automatically find out if there is a way to represent &lt;target_path&gt; from &lt;source_path&gt; as a relative path. E.g. Let's assume  &lt;source_path&gt; is /foo/bar/something &lt;target_path&gt; is /foo/hello/world  The result would be ../../hello/world Why I need this: I need  like to create a symbolic link from &lt;source_path&gt; to &lt;target_path&gt; using a relative symbolic link whenever possible, since otherwise our samba server does not show the file properly when I access these files on the network from Windows (I am not the sys admin, and don't have control over this setting) Assuming that &lt;target_path&gt; and &lt;source_path&gt; are absolute paths, the following creates a symbolic link pointing to an absolute path. ln -s &lt;target_path&gt; &lt;source_path&gt;  so it does not work for my needs. I need to do this for hundreds of files, so I can't just manually fix it. Any shell built-ins that take care of this?
111273
Sometimes, I need to check only the directories not files. Is there any option with the command ls? Or is there any utility for doing that?  EDIT: I'm using Mac OS X, and ls -d gives me . even though I have directories.
54920
Sometimes a command is aliased to itself. For example:  $ type ls ls is aliased to `ls -al'   How do I invoke type on the ls command itself (and not the alias)?
82167
There is a thread that talks about ls "*" not showing any files, but I actually wonder why the simple  ls *   command doesn't output anything in my terminal other than  ls: invalid option -- '|' Try 'ls --help' for more information.   while   ls   will list all the files in the current directories as    1                  ferol                      readme.txt  2                  fichier                    sarku  2018               GameShell                  Templates  22223333          '-|h4k3r|-'                 test  3                  hs_err_pid2301.log         test2  CA.txt             important.top.secret.txt   toto.text  CA.zip             JavaBlueJProject           tp1_inf1070  countryInfo.txt    liendur                   'tp1_inf1070_A19(2) (1)'  currency           liensymbolique             tp1_inf1070_A19.tar  curreny            LOL                        Videos  Desktop            Longueuil                 'VirtualBox VMs'  Documents          Music                      words  douffos            numbers                    Zip.zip  Downloads          Pictures  examples.desktop   Public   Any ideas as to why the globbing doesn't take effect here? I'm on Ubuntu, working in the terminal, I don't know if it makes a difference.  Thanks.
23932
I'm on a Mac and the cp and mv commands are killing me due to them copying the contents of a directory if a trailing slash is present. It has bitten me more than once when I use tab completion to specify the directory I want to copy.  I have noticed zsh has a neat feature that removes the trailing slash if it's not needed after a space or enter key is pressed. Is there any way to have bash mimic this behavior?
94774
ls returns output in several columns, whereas ls|cat returns byte-identical output with ls -1 for directories I've tried. Still I see ls -1 piped in answers, like ls -1|wc -l. Is there ever a reason to prefer ls -1? Why does ...|cat change the output of ls?
34921
Whenever you type ls -a into the command prompt, you usually get all of your folders, files, and then you see that the first two entries are . and ..  Just curious, but what is the significance of these two entries?