The ls command lists the contents of a directory.

learn more… | top users | synonyms

0
votes
4answers
62 views

use ls > filelist and change file list content to file list

I need to use the ls > filelist and, however when is use "cat filelist" it displays all the content in the filelist with filelist as one of the names in it, but i need to change it "* * * File List ...
0
votes
3answers
126 views

How to list all files *.html bigger than {size} excluding some {*parts*}

I need a command to list files. But I have three problems: I want files ending with .HTML and .HTM If any file has parts like: google docs or form in the name, I want to exclude it. I want just ...
0
votes
3answers
659 views

Number of files in a directory starting with specific text

How to get count of files in a directory starting with specific text like dataxxx.csv
6
votes
2answers
441 views

How to colourise hidden files in `ls` file listings?

LS_COLORS environmental variable lets you decide on colours for different file types for ls command, such as, directories, regular files, links etc. I suppose that dot files are considered a variation ...
1
vote
2answers
284 views

ls or find option to exclude binary files

How can I list only files that aren't compiled code in the current directory? I'm reviewing the custom scripts and code on several HPUX and Linux servers before transferring them to a newer system. ...
0
votes
2answers
23 views

Changing the color of only one directory in ls

Is there a way to change the color of only one of the listed directories in the ls command? I have researched the LS_COLORS variable, but this doesn't solve the issue because you cannot list specific ...
4
votes
1answer
139 views

Why does “ls” sporadically output only “.” in the root directory of an external drive?

In the root directory of my USB flash drive, sometimes when I run ls, the output is normal and it lists the files. At other times, the output is simply one line: $ ls . If I try ls -la at one of ...
4
votes
1answer
422 views

How to understand the security context in “ls -Z”?

After referring "man ls", it shows "ls -Z" can display the security context: -Z, --context Display security context so it fits on most displays. Displays only mode, user, group, security ...
3
votes
1answer
25 views

How can you group symlinks with directories in `ls` output but tell the difference?

In ls output, I'd like to group symlinks that point to directories along with the rest of the directories, but still have a way of telling that it's a symlink either with color or an appended symbol. ...
3
votes
1answer
208 views

Changing the spacing between files in ls

This is more of a cosmetic question but this is really bugging me. On OS X, when I run ls -G (or use CLICOLOR=1) instead of regular ls it changes the spacing of the columns, as you can see in this ...
2
votes
1answer
96 views

GNU ls long listing without permissions/mode bit

Is it possible to make GNU ls omit permissions/mode bits in long listing? If not, is there an alternative, practical and commonly available program that is more flexible?
1
vote
1answer
202 views

Show column headers with “ls” command

Does the ls command have any functionality to show the column headers for decoding what the columns are? I'm aware of the portion of support text that describes the columns in info ls
1
vote
1answer
72 views

How to make ls warning me about parent directory is symlink

I just found a scenario which i (or someone new to linux) might accidentally rm file because user thought it's duplicated file. Let's say i have this two binary files: [xiaobai@xiaobai note]$ ls -...
1
vote
1answer
276 views

change LS_COLORS behaviour

I am trying to modify LS_COLORS behavior. Presently it (say for sh or py), changes color depending on if it is executable or not, as shown here But, I want all my script, executable or not, have ...
1
vote
1answer
1k views

List files from time X to time Y

How to list out all files created between from 'x' to 'y' time? I want to list out files created between "29-dec-2014 18:00" to "30-dec-2014 18:00". Using ls or stat?
1
vote
1answer
185 views

Display full ISO time in OSF1

I am working on an HP OSF1 (Tru64) based server and need to display file listings with the full-iso time format style. Example of this in Ubuntu Linux, user@hostname:~/Desktop$ ls -lrt --full-time ...
0
votes
1answer
26 views

Move files only if filename based regex does not match file in target dir

Best explained by an example: Source dir: file-a-1.txt file-b-1.txt Target dir: file-a-2.txt Expected result: file-a-2.txt file-b-1.txt Move all files from src dir to target dir only if ...
0
votes
1answer
58 views

permission denied, cannot list files within a folder

I have a folder like: drwx--xrwx 9 user group 4096 May 1 11:17 160429_ST-E00110_0195_AHMFVNCCXX However my user other can't do ls: -bash-4.1$ ls 160429_ST-E00110_0195_AHMFVNCCXX ls: cannot open ...
0
votes
1answer
71 views

bash: How to determine the largest number (newest version) from: ls *.tar.gz | cut -c 2-4

Hi I'm trying to get the largest number (newest version) of a file, I got a bunch of tar.gz files in a directory, versions of some software in the format v${version_number}_software.tar.gz, where ${...
0
votes
1answer
461 views

External Hard Drive Issue on mac

After the cd /Volumes command when I type ls it shows me my hard drive name twice, with different permissions. After that when I try to use mkdir to create a directory in the external hard drive I'm ...
0
votes
1answer
567 views

Linux can't read and write, but windows can

I have a hard drive with a lot of back up files, that were created by PhotoRec. When mounting it with a windows computer I can read all the files perfectly fine. Under linux I get an error when ...
-1
votes
1answer
49 views

wildcard usage for a directory displaying filenames in linux?

so one of the questions i have been working on is to display the contents of a directory files by using its wildcards do display specific contents, in this case aim using ls and the portion that I got ...
-1
votes
1answer
2k views

list files in ascending order

I am trying to display file names(with complete path) based on the created timestamp in ascending order. if files exists: display files with complete directory path in asc order. if files do not ...
5
votes
0answers
113 views

Is it possible to make ls ignore Windows hidden files?

I'm using the GnuWin32 libraries on a Windows 7 machine. I do not like that the ls command shows NTFS hidden files. I've found two methods to hide these files. One solution is to mount the partition ...
2
votes
0answers
65 views

What uses Linux “application memory”?

Just for fun, I wanted to watch what ls -lR / does to my "buffers" memory on a Linux system. As expected, the value increased. But I noticed that the "application memory" (i.e. "used" - (buffers + ...
2
votes
0answers
191 views

ls does not show a hidden file (OS X)

I am using lsof to view the list of open files. One such file that it displays open is : Google 3864 malaykeshav 46u REG 1,1 470455334 32578671 /Users/malaykeshav/Library/...
1
vote
0answers
56 views

change ls color on OpenWrt

I am not able to change the color of dir entries for ls command (dark blu is a very annoying color to read) on my OpenWrt device. I've added the line LS_COLORS=$LS_COLORS:'di=0;37:' ; export ...
1
vote
0answers
34 views

`ls\` logs out of terminal session?

Like many, I have an alias ll=ls -l[.]+ set. A moment ago, I typed ll and then accidentally hit \ on the way to return. I hit return again to finish the command (on the continued line prompt), ...
0
votes
0answers
28 views

How can binary names in command prompt be colored

I recently saw in a presentation that the typed in commands that matched something in /bin /sbin /... were colored green. It looked nice and felt more structured. How can this be achieved with ...
0
votes
0answers
159 views

Cannot see files present on server when connecting via Filezilla / SFTP

I am not able to see the files present on the server using Filezilla ftp client. I am using SFTP connection. I am able to connect to the server. I can see only the directories but not the files. ...
0
votes
0answers
170 views

Completely hidden directory on ACFS imported via NFS

how is this possible: [root@oda001-d0 .ACFS]# pwd /OVS/Repositories/repo1/.ACFS [root@oda001-d0 .ACFS]# ls -la .. total 148 drwxr-xr-x 8 root root 4096 Jun 23 11:45 . drwxr-xr-x 5 root root 4096 ...
0
votes
0answers
51 views

getting ? in permissions when running ll/ls command

I am trying to remove a folder and I am getting rm: cannot remove ‘...' when running the ll command I am getting : > ll ./folder/ ls: cannot access ./folder: Input/output error total 64 drwx--...