Questions relating to the Linux 'list' command (ls)

learn more… | top users | synonyms

0
votes
2answers
18 views

ls and cd give no output when used with sudo

In my root user directory, ls outputs this: Desktop Downloads Music Public Videos Documents examples.desktop Pictures Templates However, sudo -i ls does not give any output ...
0
votes
1answer
15 views

Why does not pipe work with 'find' and 'ls'

Why does not pipe work with 'find' and 'ls' If I do find . -name *foo* | ls -lah , it does a ls on $PWD and not the output of find. The solution however is find . -name *foo* | xargs -r ls -alh or ...
1
vote
0answers
37 views

retreiving lost files [on hold]

I was trying to move multiple files and directories using a list of files and directories. I used the following command and realized I didn't set the destination correctly. while read file; do mv ...
-4
votes
2answers
55 views

why does everyone use ls more often than tree -L 2? [closed]

tree -L 2 gives better view of the documents,folders it seems to be better than ls.
0
votes
1answer
36 views

How to run a command at login

So I've been looking around and I can find ways to run commands every time you open a new terminal and inadvertently figured out how to make a continuous loop of opening terminals. I've edited ...
1
vote
0answers
17 views

How can I enable different color for FORTRAN files (or for that matter any other extension files with different colors) when listing files?

I want to display different color for different kinds of files. For example, all script files are generally highlighted in green color in bash. Similarly, I want to have a different color for all ...
0
votes
0answers
41 views

Change ls colors only in home directory not in mounted disk

I try change color of Dir in ls so i add this into my .bashrc: alias ls='ls --color=auto LS_COLORS=$LS_COLORS:'di=1;33:' export LS_COLORS and it works. But when i'm in my mounted disk it does not ...
1
vote
0answers
20 views

Set -h as default for ls? [duplicate]

I use the -h flag to make ls report in M,K,G etc Can I set the -h flag to be the defaul for ls so I don't need to write it every time ?
0
votes
2answers
32 views

In the sentence “ls -Ral /bin > TalhaA452.txt” [duplicate]

what does -Ral do? I dont know what this word means in the sentence "ls -Ral /bin > TalhaA452.txt"
1
vote
2answers
47 views

Does the terminal learn common typos? [duplicate]

This may seem like a stupid question. I'm using Ubuntu 15.10 with GNOME Terminal 3.16.2. When I was new to the system, I often typed 'l' or 'la' instead of 'ls' to list files, and would then be told ...
3
votes
4answers
707 views

Why doesn't ls combined with awk show exact sizes?

I am trying to find the size of the files on my hard drive in exact bytes, but whenever the size gets too big the number turns all weird (like 1.98329e+12). Can I stop it from doing this or convert ...
1
vote
1answer
45 views

Sort files by name as if they were dates

I have a backup bash script which hashes everything into a tar.gz in a backup dir. For a restore script, I need to be able to select the single newest one from bash. the format of my backup folder is ...
0
votes
1answer
28 views

could someone explain the outcome entries into a file? [duplicate]

I have read a really good answer explaining what -rwxr-xr-x 1 root root 523454 Aug 8 2014 name means. However, It did not explain the number before the root root. Also, could you explain what ...
2
votes
1answer
89 views

Difference in default “ls” and execvp “ls” call [duplicate]

I called "ls" command using the execvp system call from inside a c file. But there seems to be a slight difference. The exe files in the default ls call are highlighted green But not in my own ...
0
votes
1answer
43 views

How to list file names with a total of X letters

Say I have a list of the following files in my current dir: lab1.jav mytst2 pie.c prog2.c tst3.ex tst5:5.tlab2jav lab2jav.ext new.c prog1.c tst1 tst4.exc tst6:6123.tA7-tst.c ...
0
votes
0answers
17 views

funky permissions, what does it mean? [duplicate]

I was having a hard time with a particular folder. When I looked at the folder, this is what I saw: $ls -al ?????????? 2 denis denis 4096 Feb 20 09:32 public_html I changed it, with chmod, ...
0
votes
2answers
659 views

What is the la command?

I just mistyped ls as la. Without noticing, I ran it: tim@Hairy:~$ la detection.sh output-2.jpg output-4.jpg output-6.jpg output-8.jpg Test1.pdf output-1.jpg output-3.jpg output-5.jpg ...
0
votes
2answers
161 views

Long Commands Pasting Into The Terminal

I can't paste the long command into the terminal. There is a ls command which takes alot of argumnets and i'm trying to insert in into the terminal by copying. But it runs every single line. So i ...
3
votes
1answer
66 views

ls output not compact anymore

I wanted to ask about the ls command in lubuntu 15.10. Now there is a new line for every entry. I know from other distributions that there is also an output style where ls outputs the content of ...
0
votes
1answer
41 views

Can't execute this file [closed]

I can't execute the skype file. I have the permissions I need. What's the meaning of filename* in the ll output?
0
votes
0answers
26 views

what do the columns in 'ls -l' mean? [duplicate]

I am looking specifically for the second column and how to change it. I know it has something to do with owners or groups but I cannot find a direct definition of what it means
4
votes
3answers
464 views

Size of device file ( missing in ls -l output )

When I try to print the device file output shows binary data in hexadecimal format. But upon doing a ls -l /dev/sda I get: brw-rw---- 1 root disk 8, 0 Jan 29 12:29 /dev/sda I don't ...
0
votes
1answer
30 views

What do these files mean and how should I replace?

In order to get into Symphony framework I had to install Virtual Box (VB) and Vagrant and SSH into the Ubuntu system I created with the default values of Puphpet. In order for my application to work ...
0
votes
1answer
26 views

5030 in ls output.?

I am getting the following in the output of ls for the home directory of arcsight user. drwxr-xr-x 2 5030 tspplatformadmin 4096 2016-01-28 02:51 arcsight What I expected the output to be: ...
1
vote
1answer
64 views

Meaning of “b” and “c” in file privileges description (output of ls -l)

Basic question regarding the ls utility. What do letters "b" and "c" mean at the beginning of the 10-symbol code describing the item privileges ? From what I understand, when typing ls -l, the ...
0
votes
1answer
60 views

Display the name of all files with home directory which is smaller (in size) than 10 KB but bigger than 5 KB

Display the name of all files with home directory which is smaller (in size) than 10 KB but bigger than 5 KB. using Linux comand. pls help me
1
vote
3answers
136 views

ls command to view particular string in filename within directory

I have bunch of files in one directory. I want to list specific files within this directory whose name as follows; stacov_abcd0230.15o stacov_abcd0240.15o stacov_ab120240.15o stacov_01020240.15o ...
2
votes
1answer
387 views

why ls -a command showing file name in red color? [duplicate]

As shown in the above picture, When I do the command ls -a is one specific file name in red color. Why is it so?
3
votes
1answer
83 views

How do I sort the output of “ls” by last modified - including the date?

So the output would be either: Most recent at the top OR most recent at the bottom - giving the times when the contents of the working directory were modified? Apparently, ls -t is supposed to give ...
0
votes
1answer
48 views

ls - filtered list - total size

I'd like to list all the files beginning with z, have their individual filesize, and the total size in the bottom of the list (so I don't have to scroll up like with ls -s). DOS equivalent : dir z* ...
4
votes
2answers
2k views

What does each part of the `ls -la` output mean? [duplicate]

What do the following numbers represent?
12
votes
1answer
740 views

What are those 'x xx' in 'ls -l' command

When performing ls -l I encountered a column I don't recognize. drwxrwxr-x 7 user user 4096 × ×× 29 13:54 .eclipse drwxrwxr-x 3 user user 4096 × ×× 30 09:30 workspace drwxrwxr-x 3 user ...
7
votes
4answers
706 views

List all recently changed files (recursive)

So, I want to display (via ls for example) all files, which were changed in the last seven days. If I'm in my docroot-folder, it should be able to look "deeper". For example: File Last ...
1
vote
2answers
68 views

counting in directory

I would like to know what the difference is between: $ ls | wc -l and $ ls > foo $ wc -l < foo when counting all files in the current directorys. And why does the second one gives me one ...
7
votes
3answers
822 views

Listing files with grep?

I have a directory that contains the following files: file1a file1ab file12A2 file1Ab file1ab I want to list all files that start with file1 and followed by two letter at most! The solution I ...
-1
votes
5answers
297 views

How to get a new line at the end of pipe command

I want to write a piped sequence of commands which prints out a list of all the subdirectories of the given directory, and printed in one line, following a new line. I'm having trouble to make the ...
6
votes
4answers
354 views

is there ls -l numeric formating?

consider the output of this ls -l command: $ ls -l /usr/bin | tail -rwxr-xr-x 1 root root 105696 Oct 25 2014 zenity -rwxr-xr-x 1 root root 188296 Oct 21 2013 zip -rwxr-xr-x 1 root root ...
0
votes
1answer
72 views

What does the ~ symbol mean next to the files that are listed with ls? [duplicate]

I created a file named xxx on my Desktop and then I (re)moved it using terminal. Now when I execute ls on Desktop I see a file named xxx~ that is not visible at GUI. What does it mean?
5
votes
3answers
785 views

found ls binary using whereis but can't find ll why?

found ls binary using whereis but can't find ll why ? How to find where ll binary loacted ? I found "ls" binary using "whereis" but can't find "ll" $ whereis ls ls: /bin/ls ...
2
votes
2answers
405 views

ls vs. ls -C difference

commands ls and ls -C seem to produce the same results - display by columns. Is there any difference?
1
vote
2answers
37 views

ls -d not doing what I'm told it should

Ubuntu 14.04 LTS Straight machine, no dual boot or anything. I am in ~/scratch I want a list of directories only. tree -dL 1 Got it! man ls says: -d List directories only instead of their ...
0
votes
0answers
53 views

Why isn't my ls not changing colors?

For some reason I can't change the colors of the following file extensions. Here is what I added to the end of my ~/.bashrc file: alias ls-"ls --color=auto" LS_COLORS=$LS_COLORS:"*.pl=32:*.lua=35;41" ...
30
votes
2answers
3k views

Why do I get a train when I run 'ls'?

I have recently noticed something odd that I don't like very much: So why am I getting a train upon running ls? And how can I stop this and make it behave normally? Is this an Easter Egg that I ...
-1
votes
1answer
82 views

why does ls -Z returns files names with question marks next to them?

why does ls -Z returns files names with question marks next to them? And what does this command do?
0
votes
1answer
184 views

What does `ls /` do? [duplicate]

Running the ls / command some files are coming out; What are those files? They are not even directories. Output of ls /: bin dev boot etc cdrom media mnt home lib lib64 proc root
1
vote
1answer
34 views

help needed understaning ls format meaning

I hit l this evening while compiling some things, and got some unexpected output. $ l l3* lesson03.cpp lesson03.o look.png readme.txt so then I looked at alias: which lists l as: alias l='ls ...
0
votes
2answers
490 views

What does the 4th column in ls -l mean

column 1 defines type of file and file permissions.** column 2 defines - i d k column 3 identifies owner of the file column 4 identifies - a user but not sure of the association column 5 file size ...
0
votes
2answers
46 views

list files or dirs starting with 'jre'

I need to list files and dirs with names starting with jre (small and capital letters are allowed). When I execute: ls | grep jre ...it greps just low capital letters and gives output with jre not ...
3
votes
3answers
515 views

Why does the ls command show deleted files?

When I type ls in the terminal, it shows the files that are present as well as the files that I have deleted. How can I see the current files only, and why does ls keep a record of deleted files? ls ...
1
vote
2answers
174 views

The foreground color changes after `ls` command

I change shell's foreground color with echo -ne '\e[1;31m' command but when I execute ls command the foreground color reverts back to the original previous color. This weird behavior doesn't occur ...