ls -al Mac Terminal

50

Solution 1

ls lists all the files in a folder

ls -a lists all the files, including hidden files

ls -l lists all the files, in "long format" which basically tells you anything you needed to know about the files

ls -al is a combination of ls -a and ls -l

You can find more information about a command by typing man <command>, ex: man ls will give you more information about ls. To exit man hit q.

Solution 2

  • -a means include all files, including the current directory, parent directory and files whose names begin with a dot.
  • -l means display in long format.

To find out how the arguments affect the output of a command, use man command to see the documentation for the command. For example, man ls.

Solution 3

The command ls is for listing directory contents or file information. The option -a if for listing all files. The option -l means long listing, more detailed information. When you combine them in ls -al you should get the long listing of all files, including hidden files.

If you google "Unix beginner tutorial guide" you should come up with a lot of usable sites to learn from.

From the error you are getting, the - you are placing is not the right kind. This is possibly from copying and pasting the command from elsewhere.

Share:
50

Related videos on Youtube

Mônica Ponciano
Author by

Mônica Ponciano

Updated on September 18, 2022

Comments

  • Mônica Ponciano
    Mônica Ponciano over 1 year

    After saving my modal content, i have to submit the parent page form.. This is the function on modal:

    function save() {
      var formData = $("#frmModal").serializeArray();
      $.post('${context}/save.do', formData).done(function(data) {
           if($.trim(data) == "true") {   
                $( "#frmParent" ).submit(); // NOT WORKING
            } else {
                alert("Error");
                return;
            }
       });
    }
    

    But $( "#frmParent" ).submit(); isn't working, what's wrong?

    • Taplar
      Taplar over 6 years
      What is the value of $.trim(data)?
    • CMartins
      CMartins over 6 years
      Are you receiving any error?
    • Mônica Ponciano
      Mônica Ponciano over 6 years
      This is the response of my controller method, returns true if save succeed..
    • Mônica Ponciano
      Mônica Ponciano over 6 years
      @CarlosMartins no :(
    • CMartins
      CMartins over 6 years
      You can try to console.log the values of your data inside your if statement to see if you still have the values. It would help to see the form code as well.
  • Admin
    Admin over 11 years
    If I type: "man ls -al" I get: "man: invalid option -- l" Anyway, now thanks to you I already know what does it mean. Thank you!
  • Admin
    Admin over 11 years
    If I type: "man ls -al" I get: "man: invalid option -- l" Anyway, now thanks to you I already know what does it mean. Thank you!
  • Lipongo
    Lipongo over 11 years
    type man ls not man ls -la.
  • Kevin Johnson
    Kevin Johnson over 11 years
    @Narcís oh, you can't use the arguments with man, you have to just use the man command and skim through the article to see what the arguments mean.
  • Kevin Johnson
    Kevin Johnson over 11 years
    And if this solved your question you might want to mark it as accepted, by clicking the green checkmark next to the answer that helped you most.
  • Admin
    Admin over 11 years
    Both answers Lipongo and Kevin are clear and very good. Thank you both!
  • Taplar
    Taplar over 6 years
    formData is an array... Other than that, all you added was a console log for your solution.
  • Mônica Ponciano
    Mônica Ponciano over 6 years
    It's entering the condition