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

learn more… | top users | synonyms

-1
votes
2answers
16 views

linux ls -l 5th column header size units?

after I ran this command in my linux terminal, ls -l I get the information listed in long file format. Below is an example of my output: drwxr-xr-x. 10 10011 10011 4096 Oct 14 18:51 ...
0
votes
0answers
11 views

an ssh subsystem that does ls

Normally you create a subsystem by doing Subsystem vim /usr/bin/vim or something like that. So how would I do a subsystem that did ls -la? ie. you call the ls subsystem, it gives you an ls and then ...
2
votes
1answer
40 views

ls -l but not ls --color=never slow on nfs-mounted directory, if simulatenously writing to that directory

when I dump data into an NFS-mounted directory, reading files modes (e.g. ls -l) is several orders of magnitude slower than a plain file listing (e.g. ls --color=never). I would like to understand ...
1
vote
1answer
46 views

Bash - list files within date range

So far I've been basing my efforts around this blog and have come up with: startdate=”201407010000? enddate=”201408010000? touch -t $startdate ./startdatefiles touch -t $enddate ./enddatefiles find ...
0
votes
1answer
27 views

If the permissions on a file were set so that everyone could read from or write to the file, how would that be represented symbolically

If the permissions on a file were set so that everyone could read from or write to the file, how would that be represented symbolically (within the output of an 'ls -l' command)?
0
votes
1answer
33 views

Why doesn't ls show the group name?

When I use ls -l, it does NOT show the group names in the listings. Only the user names. aj@host:/media/storage$ ll total 724 drwxrwxrwx 10 root 4096 Sep 17 18:23 . drwxr-xr-x 3 root ...
0
votes
1answer
22 views

How can I get VIM to maintain the creation date for a file? (OS X)

So whenever I save a file in VIM on OS X, it seems to overwrite the entire thing instead of updating it. If I run ls -tU I can see that the creation date changes and it does indeed update to the last ...
1
vote
2answers
40 views

Is it possible to move last modified files using ls, tail and mv?

I want to move the last 3 modified files from a directory using bash commands. However, I noticed that I can use find in the following way: find . -type f -mtime -0.5 -print -exec mv {} ...
0
votes
1answer
26 views

cd into first/second/third directory returned by ls -d */

Say I am in a directory code: /code /very-long-and-descriptive-name If I want to cd into that directory (or a directory if it comes first in alphabetical order), I can just cd *. Now say I add ...
1
vote
2answers
148 views

OS X Terminal wildcard doesn't work for some paths

Okay, this is weird, hopefully someone here can explain what is happening. I am using OS X 10.9.4 and I want to list files in a directory (and filter them using *) I want to look for zip files in ...
0
votes
1answer
27 views

problematic listing of folder with many files

In ubuntu I have a folder that contains many (~10M) .txt files (around 1-2KB each). Folder is not big by itself (around 400MB) and does not contain subfolders, just the .txt files. I need to list it ...
0
votes
1answer
350 views

FTP.exe ls to local Output File Permission Denied on Local Network

I am trying to access a directory on my Filezilla FTP server using the ftp command in Windows from a local computer on the network, and then put a list of all those files in the directory in a text ...
0
votes
2answers
72 views

Whats the meaning of “???” in ls command output

I am using WD my passport hard disk. when i use ll -l command in my hard drive it shows as below ls: cannot access The.Big.Bang.Theory.S07E15.HDTV.x264-LOL.mp4: No such file or directory ls: cannot ...
0
votes
1answer
38 views

SunOS 5.10 - ignore certain files in ls

I don't know why but I can't execute ls with ignore flag: -bash-3.2$ ls -I '*.log' ls: illegal option -- I Do you know what else can I try?
0
votes
2answers
71 views

How to List Files greater than particular timestamp?

I have a directory in linux which has a list of log files where log files get auto generated if some job runs. Each log file gets appended with the timestamp like "JobName_TimeStamp" UPDATED: ...
4
votes
1answer
67 views

Finding the newest file in a directory with a million files

I'm currently using ls -t | head -1 to get the name of the newest file. But it takes a long time because my directory has a million files. I guess a chunk of time is lost unnecessarily in ls -t when ...
0
votes
1answer
314 views

How to create a fixed size virtual disk with qemu-img?

What's the best way to create a fixed size disk with qemu-img ? I tried doing this., and it always seems to be creating a virtual /growing disk, doing a ls returns the actual small size of the vmdk. ...
3
votes
1answer
72 views

Why is `ls` command not permitted in non-root account even using `sudo`?

I logged into Ubuntu with guest session account, but the ls command is not permitted even using sudo. But... why? Any ideas?
0
votes
2answers
158 views

ls to list files sorted by filename without the extension

I want to list a bunch of files that are sorted by their names excluding the file extension. I have these files in a directory $ls mobility_arXiv.tex mobility_SR.bbl paper-hj-mm.tex ...
0
votes
1answer
38 views

Ignoree a specific file in file count “wc -l”

e.g. I have directory like ABC. And this directory contain following files (it contain number of files i just include 4 fils here) 2014-04-29T06-19-20_17368f93ce.mp4.uploaded ...
2
votes
2answers
145 views

How to list only ordinary files on UNIX

I'd like to list only ordinary files (not directories or symlinks) using ls from GNU tools. So far I have only some hackish greps. Is there an option or better way of doing that? Edit: I need more ...
1
vote
1answer
80 views

Completely hide files on Linux

i was wondering if there's a way to prevent a ls -a command to display certain files to certain user/group The criteria could be: if the file is hidden and the user/group has no read access, then ...
0
votes
2answers
158 views

ls command - long format field separator

Is there a way to use a different field separator for the long output of ls? I have problems in parsing the output of ls -l because some fields, in my case the group, contain spaces. I went through ...
6
votes
2answers
248 views

What is the modification date ls reports for directories in Bash shell?

When I run ls -l in Bash shell, it lists a modification time for both files and directories. As noted in this thread, the modification time for directories does not reflect all of its contents. It ...
3
votes
1answer
122 views

What causes files to use up more more disk space than the file size suggests?

du was showing some drives with much less space than I was expecting, and ls -alh also showed the sum at the top to be a factor of three more than the sum of the individual files. Following this ...
0
votes
0answers
29 views

What does the at sign mean when listing files with ls? [duplicate]

When copying files with cp command on Mac OSX Mavericks and then looking at them ls command I sometimes see an @ sign in the listing. What does it mean please? For example: # cp -v ...
2
votes
1answer
21 views

Search .zip files for sizes

I have a directory with many .zip files. I wish to search through them to match an uncompressed file size (I am trying to find which .zip my file originated in, and the name's been changed). IDEALLY, ...
2
votes
3answers
93 views

Linux - Open nth File LIsted

I'm Ubuntu, I do ls and get a list of files. How would I open the nth file in the list in VIM in reference to its position from the ls command, and not its name? I want to do this cause a directory ...
1
vote
3answers
4k views

Ls command in bash script says 'No such file or directory'

The following is the script I am running #$1 - Argument declare IPATH="sample/" declare F=$IPATH$1 echo $F ls $F The input is ./script.sh "Fil*" The echo output is - sample/Fil* when I run the ...
0
votes
1answer
41 views

Supressing backup files in a ls command not working

How do I suppress backup files displayed in ls? I've already tried - ls --ignore-backup and ls -B Neither suppress the back-up files created by the editors. Am I doing something wrong? or Is there ...
1
vote
1answer
99 views

Find the largest file in directory without size in output

I need to find the biggest file Only one file should be listed Search should work in given directory and subdirectories Output should display absolute path to the file with filename find "$PARAM" ...
2
votes
1answer
92 views

find -mtime fails to return results that ls -l show are there

On a Red Hat Linux system, I have a directory with several hundred files. I wanted to delete all files older than 24 hours. I did the deletion using find . -type f -mtime +1 -delete. Trivial stuff, ...
1
vote
3answers
88 views

Show thumbnails in Mac terminal?

Some time ago I've googled nice screenshot of Mac terminal How it can be possible? Special terminal application or special settings of ls?
-2
votes
2answers
62 views

Output of ls command

22387281 -rwxr-xr-x 1 john ce0814 8936 5 Oct 13:54 frk 22379635 -rw-r--r-- 1 john ce0814 322 5 Oct 13:53 frk.c 22445178 -rwx------ 1 john users 4 7 Oct 12:05 log.txt What are the first and third ...
0
votes
3answers
321 views

Get the last file name in a variable in bash?

In a directory, I have the following files: myfile_v01.txt myfile_v02.txt myfile_v03.txt How to make a bash script that detects the value of the last version and put the filename of this last ...
0
votes
1answer
1k views

List files of folder page by page with LS command

I'm wonder if there is some way to list all files of a folder by ls, I know how to use ls for a folders which are small but if list of files doesn't match with the screen size what should I do? there ...
0
votes
2answers
277 views

Unable to get ls to recognise LS_OPTIONS or LS_COLORS?

Trying to get --color=auto as the default ls argument. $ ls --version ls (GNU coreutils) 8.21 … $ echo $LS_COLORS ...
2
votes
2answers
645 views

In linux, how do you get a total size of a folder for files that are 1MB and up

Hi im doing some cleaning up on my server and i want to know how would i get the total size of a folder of files that are 1mb and up and also 1mb and below. I got as far as: ls -lh | grep 'M ' But ...
1
vote
1answer
599 views

How to make `ls` color its output by default, without setting up an alias?

I don't want an alias (alias ls='ls --color'), and I had previously set this up on Mac OSX using CLICOLOR environment variable which magically brought colors to ls. Now I am on Linux (Arch x86-64) ...
1
vote
2answers
42 views

Subdirectories in prompt?

I'm working on making my prompt as useful as possible. Right now, it contains the date, time, and directory, along with a colored divider line so I can easily see where each batch of input starts. I ...
0
votes
2answers
86 views

What does the * mean next to a filename in the ouput of the command ll? [duplicate]

I have a doubt related the output of ll command. When, in my shell, I execute the ll command I obtain this output: -rwxrwxr-x 1 andrea andrea 104215 ott 15 15:56 atmosfs* Why I have the * next to ...
1
vote
1answer
347 views

ls -l output difference between files and directories?

I looked at IBM's site and read the definition for ls -l, but could not find an answer to my question. When issuing an ls -l command on AIX, what is the explanation for the different 'file size' ...
0
votes
2answers
195 views

ls -l | wc -l output is different when redirected to a new file

"ls -l | wc -l" outputs "1+no. file/directories"(extra one for the first line). However when I run the command ls -l | wc -l > temp (when output is redirected to a new file temp). The value stored in ...
1
vote
2answers
215 views

Ignore NTUSER.DAT files when ls on Git Bash?

I use Git Bash as my terminal on Windows. When I ls in my Home directory, I see some NTUSER.DAT entries, which I assume are system files. They don't appear when I run dir in the default Windows ...
3
votes
1answer
183 views

what does this output of ls mean?

sysadmin@ubuntu /etc $ ls vsftpd* vsftpd-users.db vsftpd.conf vsftpd.conf.backup vsftpd: vsftpd.pem what is this vsftpd: vsftpd.pem part, and what does it mean? I never seen such before. does it ...
0
votes
2answers
1k views

Show mounted USB device on Linux

I want to find /dev/ location of a USB device. The main thing is, it's not a drive or any other mass storage , it is basically only a USB modem and wvdial can not detect it. So I just want the ...
1
vote
1answer
64 views

What does # mean in ls output

when I do an ls on a director I get an output like xxxx@l70:~/mail$ ls inbox #inbox# What does the # mean in this context?
0
votes
2answers
61 views

What does the @ at the end of access rights stand for? [duplicate]

When I ls -la, one of my folders has the following notation drwxr-xr-x@ 28 what does @ stand for? For the record, I am using OSX.
2
votes
2answers
462 views

How can I make “ls” show dotfiles first and preserve unicode filenames?

$ export LC_ALL=en_US.UTF-8 $ ls -al total 24 drwxr-xr-x 6 pi pi 4096 Jul 23 16:34 . drwxr-xr-x 9 pi pi 4096 Jul 23 16:33 .. drwxr-xr-x 2 pi pi 4096 Jul 23 16:33 .A drwxr-xr-x 2 pi pi 4096 Jul 23 ...
1
vote
3answers
226 views

Pipe with ls command

When I want to know if a command is a link or not, I do like following. $ which locate /usr/bin/locate $ ls -l /usr/bin/locate lrwxrwxrwx 1 root root 24 5月 3 2012 /usr/bin/locate -> ...