2
votes
2answers
70 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 ...
6
votes
2answers
158 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 ...
0
votes
1answer
62 views

On executing ls bar you see a list of 10 files of which bar is one of them. How can that happen? [closed]

I came across this question in an exercise in a UNIX textbook and can't seem to figure it out
1
vote
1answer
287 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' ...
3
votes
1answer
165 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 ...
5
votes
3answers
925 views

List file range with UNIX wildcards

Say for example I have the following files in my working directory: mjk0001.fits, mjk0002.fits, ... numerically increasing all the way to mjk9999.fits. Is there a way to use UNIX wildcards to list or ...
3
votes
2answers
120 views

One line ls command to display symbolic links

How can I use just one single ls command to display all symbolic links in my /dev directory? I know ls -l and that's about it.
4
votes
1answer
638 views

Why does `ls` without any arguments (only flags) give me “no such file or directory”?

When I pass --color=always to ls, it occasionally outputs a number of No such file or directory errors, like this: ~/svn/projects/submm/adda/scat$ /bin/ls --color=always ls: cannot access ...
3
votes
5answers
4k views

How to display the file contents recursively?

I always have to submit the source codes in my printed assignment report. I have to copy and paste my course codes into the document and I find that it is an annoying task. I want to solve this "copy ...
0
votes
1answer
287 views

Unix - Find files with the same name under a directory using ls

I want to list all suhosin.ini files under /etc/php5/ directory. The thing is that the 3 of them are one level deeper in the directory tree. I want to combine these two to one command # ls ...
0
votes
2answers
293 views

Unix list absolute file name

Given an arbitrary single argument representing a file (or directory, device, etc), how do I get the absolute path of the argument? I've seen many answers to this question involving ...
1
vote
2answers
1k views

How come the ls command prints in multiple columns on tty but only one column everywhere else?

Even after using Unix-like OSes for a couple years, this behaviour still baffles me. When I use the ls command in a directory that has lots of files, the output is usually nicely formatted into ...
0
votes
2answers
25 views

Change to xth directory terminal

Is there a way in a unix shell (specifically Ubuntu) to change directory into the xth directory that was printed from the ls command? I know you can sort a directory in multiple ways, but using the ...
3
votes
2answers
2k views

What does the number after Unix/Linux file permissions like “-rw-rw-r--. 1 ” mean in “ls -l” output

Can any one explain "-rw-rw-r--. 1 " and give some "detailed" information on ls -lart command. Why does the number change after "-rw-rw-r--. 1 " <----
3
votes
3answers
703 views

What is user/owner 24561?

So, I just installed the node.js package from nodejs.org and I was poking around to see what it installed. Over in /usr/local/bin I saw this owner 24561. I see it in a few other places too. What is ...
0
votes
1answer
204 views

list files with full modification date

I want to produce a list of files in a directory and feed it into a script to generate database entries including their creation dates. The database is Solr, so I need to be able to translate ISO 8601 ...
1
vote
1answer
546 views

“ls -t remotefile localfile” does not work over FTP

I'm interested in listing remote files (with names matching a pattern) by date, and storing this list locally. The various things I've tried follow: ls -t SL*.txt ...is interpreted as a request ...
0
votes
1answer
223 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 ...
5
votes
1answer
597 views

What is the + at the end of Unix permissions in a long listing format?

Here's an example drwxr-xr-x+ 6 reza reza 204 Mar 5 20:23 .ssh/ Although I am the owner of this directory, I cannot modify it without using sudo! Why is that? how can I remove '+' here ...
0
votes
0answers
32 views

What is the '+' at the end of long listing format? [duplicate]

Possible Duplicate: What is the + at the end of Unix permissions in a long listing format? Here's an example drwxr-xr-x+ 6 reza reza 204 Mar 5 20:23 .ssh/ Although I am the ...
3
votes
5answers
7k views

How to list files by file owner in Unix command?

I need to list all of the files my WD sorted alphabetically by the file owner name. Does ls have something for this?
2
votes
4answers
1k views

Alternatives to cd/ls for command line navigation?

I generally work a fair amount from the command line in order to launch vim, git, ssh and so on. However, I find the Finder's columnar view more natural for browsing through my files. Unfortunately, ...
1
vote
1answer
1k views

How to use wildcards with ls without listing directory contents?

ls typically displays only the files and folders in the present directory. But once you add a wildcard it starts searching in sub-directories. example: $ ls fight_folder file1 file2 $ ls ...
0
votes
2answers
381 views

How do I interpret “total 18” in the output of the “ls -l” command in Solaris10?

auyantepui# ls -l total 18 drwxr-xr-x 2 root sys 512 May 23 13:11 READMEs/ drwxr-xr-x 2 root sys 1024 May 23 13:11 bin/ drwxr-xr-x 2 root sys 512 May 23 13:09 docs/ drwxr-xr-x 2 ...
20
votes
2answers
10k views

How do I interpret the results of the `ls -l` command?

I want to learn about the meaning of values for example first line; drwxr-xr-x 2 ataka root 4096 2008-11-04 16:58 ataka is ataka here the owner of directory ? kioutsovkm@orkide:/users/lnxsrv2/ee$ ...
3
votes
3answers
857 views

Is there a tool on Unix, Linux, Mac, Windows, Ubuntu, that will list file / directory structure?

I wonder if there is a tool that will list file / directory (i.e. take a snapshot of the folder and file structure) like the following: audio mp3 song1.mp3 some other song.mp3 audio books ...
34
votes
9answers
22k views

Unix: ls, how to sort first directories then files etc

I would like to use ls command to first show direcotries and then files. I tried ls -la | sort -k 1 But I got a wrong order.
0
votes
3answers
991 views

Bash: overridding ls -la with ls -la | more (basic bash scripting problem)

Pretty new to bash scripting. Trying to over ride the ls -la command to be: ls -la | more (Seems more useful for me). I added this to the end of my .bashrc. 154 # alias 'ls -la'='ls -la | ...
6
votes
4answers
1k views

Pass the output of ls to diff

I have one file that contains a list of files from a server, and a local folder that I compare to that manifest. Obviously, I do 'ls -1 > listing_local' and then diff that file with listing_server. ...
10
votes
8answers
20k views

Tell `ls` to print only the base filename

This is the default behaviour of ls ls /net/nas/data/languages/pypm/sites/rex/free/2.6/*/pool/v/vi/virtual*1.4.4*pypm ...
10
votes
2answers
7k views

What does the @ in ls -al mean? [duplicate]

Possible Duplicate: ls -la symbolics… what does that last symbol mean? What does the @ in the below execution of ls -al mean? atom:Lib fak$ ls -al total 1056 drwxr-xr-x 5 fak staff ...
23
votes
0answers
20k views

ls -la symbolics… what does that last symbol mean?

Possible Duplicate: what does the @ mean on the output of ls on os x terminal? when I type ls -la I get this familiar output... drwxr-xr-x+ 38 kent staff 1292 Nov 6 11:09 . ...
0
votes
4answers
233 views

How can I do `ls` on a dotfile?

ls on a dotfile My directory contains: $ ls -A .dotfile20091021 file20091020 file20091021 I want to list ALL files containing 20091021 in their name. If I run: $ ls -A *20091021* ...
3
votes
5answers
3k views

Listing everything else than *{.tex, .aux} by ls

How can you ls everything else the the files *{.tex, .aux}? I run unsuccessfully ls -I".tex"
382
votes
7answers
242k views

How can I sort the output of 'ls' by last modified date?

How can I sort the output of ls by last modified date?