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

learn more… | top users | synonyms

0
votes
0answers
28 views

ls command not working in ubuntu 14.04

I was trying to use ls command in my ubuntu 14.04 but it keeps on showing the following error, ls: unrecognized option '--color=auto' BusyBox v1.21.1 (Ubuntu 1:1.21.0-1ubuntu1) multi-call binary. ...
0
votes
0answers
17 views

can anybody explain what ls -l do? [duplicate]

can anybody explain what ls -l do? I'm new to command line functions so simple explanation would suffice. Thank you. For my reference the results I get when I typed ls -l was: drwxrwxr-x 3 student ...
0
votes
2answers
86 views

What does 'ls -al' do?

When I entered the -al attribute with the ls command, I got the following: anupam@JAZZ:~/blog$ ls -al total 76 drwxrwxr-x 13 anupam anupam 4096 Aug 28 21:45 . drwxr-xr-x 34 anupam anupam 4096 Aug 28 ...
3
votes
1answer
155 views

exclude certain files in ls

I would like to run ls and exclude certain files in the output. When I run the following command, I get all files with each on one line: $ ls -1 file1 file2 file3 temp I would like to run this ...
0
votes
0answers
8 views

How do I djvubind on ls and grep result?

How do I djvubind only files that are in ls | grep -P "page\\d\\d\\d.tif"?
0
votes
2answers
91 views

terminal ls command not showing all files

I'm familiarizing myself with the terminal, and trying to use the ls command is the directory /usr/bin. Unfortunately, it doesn't show me everything in the folder, the terminal cuts it off. How ...
1
vote
1answer
24 views

Sorting files by ASCII conventions in Ubuntu 14.04

This has been an incredible annoyance for me because it should be so easy to fix!!! I want ASCII conventions to be applied when sorting files (both in the terminal and in nautilus) because the ...
7
votes
3answers
120 views

List files appended with an order number

Is there a quick way to list all the files from a location having an appended order number? something like: ls -a generates the result: 1 file a 2 file b ... 100 file whatever Thanks. P.S. ...
-1
votes
1answer
36 views

list directory name of symbolic link

I am trying to find all the symbolic links on my system with name keytool. I use the below command : ls -lR | grep keytool It gives some results, but i want the directory names as well. So i use ...
0
votes
1answer
18 views

before.rules date

I can't figure out why one of my before rules file has a date that is in the future. Today's date is July 3rd but the file time stamp states Jul 6. Below is the output from ls -l in the /etc/ufw ...
-5
votes
5answers
78 views

List hidden files without using - ( * | [closed]

Is it possible to list hidden files without using the characters mentioned above? This means not using any options or the * wildcard as well as some other characters (e.g this is not allowed "ls -a", ...
3
votes
0answers
117 views

ls on home directory very slow

A while ago, I accidentally created hundreds of thousands of files in my home directory which I subsequently deleted. Since then however, running ls in my home directory has been extremely slow ...
2
votes
2answers
186 views

ls system command not showing terminal colors

I've just been fooling around with some code in C, an example of a really basic program is as follows which just, obviously, lists the directories using the ls system command. #include ...
1
vote
1answer
36 views

Changing current directory to directory that have identifier as the substring

My terminal is currently in the home directory, and the home directory contains a directory which have "round" as the substring. Is there any way to directly change to that directory without typing ...
9
votes
8answers
2k views

How to show only hidden files in Terminal?

I have a directory that contains thousands of files, some of them are hidden. The command ls -a list all files, including hidden ones, but I need just to list hidden files. What command should I ...
1
vote
1answer
47 views

What does ? in output of ls -la mean?

I'm having trouble with my webserver an noticed that the output of ls -la /var/www contains irregularily ? instead of permission digits, e.g. $ LANGUAGE=C ls -la /var/www/ ls: cannot access ...
0
votes
2answers
46 views

How do I change the color for directories with ls in the console?

On my console the color for directories is such a blue, that it is hard to read on a dark background. How can I change the color definitions for ls? After trying something, I wonder how to just ...
1
vote
1answer
50 views

Find files in a directory and list them

I'm in a directory containing several sites directories. All these sites have a logs/ directory. I wish to find and list the files under each logs/ directory with the -ls parameter.
4
votes
6answers
1k views

Count total number of files in particular directory with specific extension

I want to count the total number of files in particular directory that ends with ".mp4" extension. I am getting following command: ls -F |grep -v / | wc -l It count all the files in particular ...
-1
votes
1answer
49 views

“How would you use the ls command to display all of the files/directories in the directory ‘/sbin’ that start with ‘az’? ”

I could do this on my own if I was in the /sbin directory, but I cant seem to figure out how to do this form the parent directory.
1
vote
1answer
51 views

One command for ls and cat functionality?

Okay guys, this is an experimental question warning! I often confuse cat and ls when quickly working on the console. Not because I forget their meanings, no. Just because I type without deeply ...
2
votes
1answer
30 views

How can I group the files in a directory based on their file size

I have a directory where I am writing lots of files but I know each of them fall under one of the 3 pre-determined memory sizes based on what I write. Any file I write may be either 300KB or 129.1MB ...
3
votes
2answers
301 views

“ls” with one-digit pattern gives me strange results

I'm running Ubuntu as VM in VMWare Fusion on MacPro: ayakovlev@ubuntu:~$ uname -a Linux ubuntu 3.11.10.3 #1 SMP Thu Mar 6 15:31:54 EST 2014 x86_64 x86_64 x86_64 GNU/Linux The command below outputs ...
-1
votes
2answers
70 views

No command is working, edited .bashrc file

I edited .bashrc file with PATH value, but when I open a new terminal after this, none of command is working. When i am opening a new terminal its giving : bash: export: `/usr/lib/java/jdk1.7.0_51': ...
2
votes
0answers
190 views

after ssh session : -bash: /bin/ls: no such file or directory

I've logged into my Ubuntu server from work via putty under Windows. Right away I noticed something weird. I could not use the ls command. Got: -bash: /bin/ls: no such file or directory I didn't pay ...
0
votes
1answer
90 views

List Video Filename and Duration for multiple files in folder and subfolders with path too if possible

I need to get a list of filenames and path along with the duration of the file. All are video files. Some files are in subfolders as well. I need the list sorted according to duration. My goal is to ...
1
vote
3answers
78 views

Output Directory Contents to File

I have a directory html. I would like to output the files of the directory, including the path, to a file. You can do something like this with the command: ls -R scripts/html > out.txt But the ...
1
vote
1answer
65 views

Strange terminal navigation when logged in as new user

I am not even sure how to ask this properly.. I am using EC2 Ubuntu 12.04 I added a new user sudo useradd -g admin admin sudo adduser admin sudo Changed shudders so I can use new user without ...
1
vote
2answers
123 views

ls command without username?

I want to use ls --full-time -lnG but do not wish to list the user names at all. Is there any way to do this? I would consider -n and -G optional if it is conflicting with getting this done.
2
votes
2answers
247 views

Using ls and cd comands on network folders

Super-new linux/terminal user here- Is it possible to use ls and cd comands directly on directories within a public folder on a NAS, or does the share need to me mounted within the root directory ...
2
votes
2answers
46 views

Independence between sudo and the instruction it receives as an argument

I don't understand why the directory dir1 isn't shown with the same colour. Although this may look unimportant, it seems to me that this is a violation of the so oftenly mentioned principle of ...
0
votes
3answers
46 views

what is the command to be able page up/down a long text?

i keep forgetting and I am not sure how to look this up if for example i want to see the ls commands --help, its very long i remember there's a command that allows you to go up and down on the ...
0
votes
2answers
234 views

ls command very slow after deletion of thousand files on a directory

I have a dir under /home/myuser dir which an application stores and deletes millions of temporary files. When I do ls on this dir (now it only has a hundred files only) it is too slow (actually I do ...
1
vote
3answers
39 views

Confused with the alias solution?

I am trying to define alias for a group of commands counting recursively and displaying the number of all sub-directories encountered for any working directory (including ones with invisible file ...
1
vote
1answer
33 views

Having problem with alias?

I am trying to define alias for a group of commands counting and displaying the number of all files in account’s space with the names starting with g, t, and w. I got the result with the following ...
0
votes
0answers
23 views

Is ls printing wrong information for read-only NTFS mount?

I have this entry in my fstab (note the ro option) UUID=XYZ /win ntfs defaults,ro 0 0 ls / -l reads drwxrwxrwx 1 root root 8192 Nov 7 10:41 win If I try to copy something into ...
1
vote
1answer
188 views

meaning of “ls -la” color

I'm using Ubuntu12.04 and I've created two directory symbolic links. By using ls -la, console shows source directory with light blue and target directory with blue. But only one of them target ...
0
votes
0answers
128 views

Difference between ls and dir [duplicate]

Why does the output of ls appears in colour while the output result of dir command comes colorless? What's difference between the ls and dir?
7
votes
3answers
1k views

List all files that do not have extensions

I want to list all files in a directory that don't have extensions. For example: $ ls a.txt b c.pdf d e.png $ ls -someOption b d What command I can use instead of ls ...
4
votes
3answers
799 views

create a list of files located in multiple directories

I have a set of data files (*.all) located in different folders Documents/rawdata/Geob1005/1.all, 2.all, 3.all,...,n.all Documents/rawdata/Geob1006/A.all, B.all, C.all,...,Z.all and so ...
0
votes
1answer
770 views

How to list all files within subdirectories without the path?

I have 1000 directories and 5-15 sub directories within them containing mp3 files. I want to make a list of all the songs without their paths. Is it doable? Or is there a way to obtain the word after ...
0
votes
1answer
598 views

how can I recursively run chmod -x?

So I have my music collection living on my 12.04.2 server. This Collection has traveled with me over the years from a Windows machine to a MacBook Pro, and then finally to where it is today on the ...
0
votes
1answer
87 views

mouse stopped working, checked htop, and HOLY WOW my kcore file is 140 petabytes!! (see screen shot)

My mouse suddenly stopped working on my Ubuntu plex server v12.04 LTS. It still works as a remote plex server so I'm not too concerned. But I did try to login locally with it and ran htop to see if I ...
0
votes
1answer
401 views

print contents of a directory structure (filesystem) to CSV on the command line

How can I catalog the contents of a filesystem to a CSV file? This is particularly useful for removable media. I've found a couple links that point in this direction: AskUbuntu.com: listing files ...
3
votes
4answers
15k views

How to Search for Files Recursively into Subdirectories

I am trying to look for all XML files in a particular directory and all sub-directories (recursively) inside it. ls -R *.xml is only listing files in the current directory. I am quite sure, the ...
3
votes
4answers
15k views

listing files in a directory without listing subdirectories and their contents in that directory

I want to create a list of all the files in a directory, without listing any of the subdirectories that reside in that same directory, and print that list to a new file. ls -d * > filelist will create ...
4
votes
1answer
313 views

Nautilus sort order with ls

I am creating image sprites and have neatly named around 100 files. I am using the following to generate an image sprite from individual images: convert $(ls -w 1000) +append sprite.png I have just ...
1
vote
1answer
1k views

Using alias to change ls to ls-l changes(or disables) the colors of ls output

I've used alias to change ls to ls -l, but the colours change to the normal font of the terminal (also tried ls -l before the alias command and the colours appeared fine). What is wrong? Thank you
6
votes
3answers
1k views

Can ls -l be made to separate fields with tabs rather than spaces to make the output useful in a spreadsheet?

How can the output of ls -l be modified to separate fields using tabs instead of spaces? I want to paste the output into a spreadsheet; the padding with a variable number of spaces makes it difficult ...
2
votes
2answers
190 views

How can I list the files in other (non-current) directory?

If ls lists the content of the current directory, is there a similar command that list the content of a non current directory, without using cd?