The command to list the contents of a folder/directory in Unix and Unix-like systems.

learn more… | top users | synonyms

12
votes
8answers
27k views

Tell `ls` to print only the base filename

This is the default behaviour of ls ls /net/nas/data/languages/pypm/sites/rex/free/2.6/*/pool/v/vi/virtual*1.4.4*pypm ...
9
votes
1answer
7k views

ls and du shows VERY different size!

I am downloading a file with rtorrent, But when i check the folder that the file is located on ,the filesize with ls command is 4.4GB but when i check the disk with du command it shows me 219MB, also ...
13
votes
2answers
8k views

What does the @ in ls -al mean? [duplicate]

Possible Duplicate: ls -la symbolics… what does that last symbol mean? What does the @ in the below execution of ls -al mean? atom:Lib fak$ ls -al total 1056 drwxr-xr-x 5 fak staff ...
5
votes
3answers
8k views

What is the meaning of 'T' in the execution permissions of a directory?

I just found this confusing output of the ls command: whodare@ubuntu~ $: ls -l /var/spool/cron/ total 12 drwxrwx--T 2 daemon daemon 4096 Oct 29 05:02 atjobs drwxrwx--T 2 daemon ...
8
votes
2answers
27k views

How to find all soft links (symbolic links) in current directory?

Question relates to shell-scripting in bash. How to check with a script which files within the current directory are soft links? In case I have used the wrong term, when I say soft links, I am ...
23
votes
0answers
23k views

ls -la symbolics… what does that last symbol mean?

Possible Duplicate: what does the @ mean on the output of ls on os x terminal? when I type ls -la I get this familiar output... drwxr-xr-x+ 38 kent staff 1292 Nov 6 11:09 . ...
-1
votes
3answers
283 views

what does tail + number does? What about head

I just called this command ls -l | tail +3. Firstly, ls -s, produces 3 lines, adding piping strips first line and then prints each file names on a separate line. How does it do that? It doesn't make ...
0
votes
4answers
234 views

How can I do `ls` on a dotfile?

ls on a dotfile My directory contains: $ ls -A .dotfile20091021 file20091020 file20091021 I want to list ALL files containing 20091021 in their name. If I run: $ ls -A *20091021* ...
2
votes
2answers
2k views

How to change the default --color preference for "ls' on Windows?

I'm using ls (from Msys) on Windows. By default, ls doesn't colour-code directories and archives, but that's something I want. I'm tired of typing "ls -C" and "ls --color". Is there any way apart from ...
0
votes
6answers
4k views

Linux: list contents of sub directories with given name?

I'm using linux to analyze a windows directory structure. The structure is: /Documents and settings /username1 /My Documents ... /username2 /My Documents ... ... What command ...
4
votes
6answers
4k views

Listing everything else than *{.tex, .aux} by ls

How can you ls everything else the the files *{.tex, .aux}? I run unsuccessfully ls -I".tex"
9
votes
0answers
9k views

what is the @ after the permissions for in ls -l on a mac? [duplicate]

Possible Duplicate: ls -la symbolics… what does that last symbol mean? Consider the following output from ls -l on OS X 10.5.8 drwxr-xr-x 3 user staff 102 Aug 26 20:21 ...
529
votes
7answers
349k views

How can I sort the output of 'ls' by last modified date?

How can I sort the output of ls by last modified date?