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

learn more… | top users | synonyms

1
vote
2answers
1k views

How do I recursively list the contents of all files in a repository (extension-agnostic) into a single text file?

I know that using "ls -R ." in bash you can recursively list the filenames. Can I use some similar command to list the contents of each file just the way their names are displayed using the ls ...
3
votes
1answer
216 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 ...
2
votes
1answer
27 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, ...
1
vote
1answer
34 views

Alternative to ls to group extensions before sorting

I'm looking for some way to modify/replace ls with a command that is capable of: Grouping directories first (as ls does) grouping files by user-defined extension groups (e.g., all image-type ...
1
vote
1answer
159 views

Directory Listing error ONLY in port 22 (SFPT)

I suddenly get this error using SFTP: Status: Connecting to 64.207.146.82... Response: fzSftp started Command: open "root@64.207.146.82" 22 Command: Pass: ********* Status: Connected to ...
0
votes
1answer
21 views

Find last edited directory in a bash script

I have been told never to parse ls, but I would like to use the last edited directory in myDir as a variable in my bash script. I know I could capture this via ls -ltr myDir | tail -n1 | awk '{print ...
0
votes
1answer
116 views

ConEmu + ls — 256 colors not working

I'm using ConEmu (specifically Cmder's version). Running 'cmd', it supports 256 colors (top). However, I can't get other programs to run in 256 color mode. I've tried Perl (middle) and ls (bottom), ...
0
votes
1answer
40 views

Displaying unicode emoji in filenames on Ubuntu

I'd like to use emoji in filenames and access them on the command line, but I can't seem to get it to work with ls. Weird thing is, if I pipe into just about any other program, the emoji are correctly ...
0
votes
1answer
429 views

ls linux command: how to filter files in other directories

I know what ls folder/ and ls *abc* do in linux. I want to filter out some files in a specific folder. I tried this: ls folder/ *abc but it does not return correct values. Any idea? Thanks
0
votes
1answer
54 views

Why are filename ordering rules different on graphical/non-graphical linux programs?

Here is the output of an ls: x-15.txt x-1617.txt x-2411.txt x-24.txt x-ae.txt x-afag.txt x-bdaa.txt x-bd.txt Note that x-1617 comes before x-24 and the same ordering rule seems to apply to the ...
0
votes
1answer
83 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
36 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
1k 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
1answer
59 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 ...
0
votes
1answer
287 views

how to increase 16 character limit to display user name in Terminal / UNIX?

I have several Mac users attached to my NAS whose usernames exceed the 16 char user display (ie SportsFreelancer01), so under the ls -al command, it shows up as user "SportsFreelancer", without #. Is ...
-1
votes
1answer
37 views

ls: show date of last updated file in directory tree, for each directory/file in list

I am looking for parameters to ls, or something equivalent, that do the following for a specified directory: For each subdirectory: Look at each file and directory it contains, recursively. Find ...
-2
votes
1answer
2k views

ls -ltr command in UNIX and Linux - Behaviour

Why does ls -ltr show different total? We have same files in both unix and linux environment please refer BELOW UNIX > ls -ltr /A/B/C/ total 2140 -rwxr--r-- 1 demo demo 14415 May 30 ...
2
votes
0answers
43 views

How to get fish-style formatting with less

Let's say I run a command like ls in fish and get lots of output, how do I scroll through it and still keep the fish formatting or something like it? ls | less doesn't keep the formatting. I know ...
1
vote
0answers
72 views

How to ls -l file from output of grep

I was trying to run the following command: ls -lh `grep -E "^log4j.appender.File" /var/domains/*/servers/*/logs/log4j.properties | sed 's/.*=//g'` but it shows me error: ls: cannot access ...
0
votes
0answers
21 views

How to have error output from `ls` if target directory is empty

I'm currently learning how to use the Linux shell, getting to grips with the basic commands like cd, ls and pwd. My file structure is like so: user |-- documents |-- file1.pdf |-- file2.txt ...
0
votes
0answers
119 views

How to configure dircolors in Cygwin

I've been trying to customize the appearance of the ls command in Cygwin, but have not been able to get the dircolors command to work properly. I am was following the steps found in this tutorial. ...
0
votes
0answers
18 views

Filter permissions ls by directories normal users don't have read/execute access

I want to generate a list of directories within usr/bin/ that normal users don't have read/execute access to. I know I can use the 'find' command but don't know how to make it work to display what I ...
0
votes
0answers
45 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
102 views

Cannot start Tomcat server from Mac terminal?

I am trying to start the Tomcat server on my Mac. When I navigate to the bin folder, the startup.sh file is there but when I try to run it, it says the file doesn't exist: quickCoder-MacBook-Air:bin ...
0
votes
0answers
50 views

Why “ls” command highlights some folders?

Why LS highlights folder PyFac ? How disable this highlighting? IMG My .profile: if [ -f $(brew --prefix)/etc/bash_completion ]; then . $(brew --prefix)/etc/bash_completion fi export CLICOLOR=1 ...
0
votes
0answers
59 views

Why does a directory appear when viewing the home folder but not when I use the command line in Linux?

It's an odd problem in that when I browse the home folder I see the directory 'Jquery' however when I use the command line nothing appears. I have used the commands ls | less, find . -iname jQuery, ...
0
votes
0answers
120 views

MacVim prints 'ls' output whenever run via the 'mvim' command

Whenever I launch MacVim via the mvim command, I get the output of ls ~ printed to my terminal repeatedly for as long as I'm using MacVim: $ mvim base.theme.bash $ ActiveGSLocalData Music ...