0
votes
1answer
16 views

Why doesn't ls show the group name?

When I use ls -l, it does NOT show the group names in the listings. Only the user names. aj@host:/media/storage$ ll total 724 drwxrwxrwx 10 root 4096 Sep 17 18:23 . drwxr-xr-x 3 root ...
1
vote
1answer
20 views

Is it possible to move last modified files using ls, tail and mv?

I want to move the last 3 modified files from a directory using bash commands. However, I noticed that I can use find in the following way: find . -type f -mtime -0.5 -print -exec mv {} ...
0
votes
2answers
61 views

Whats the meaning of “???” in ls command output

I am using WD my passport hard disk. when i use ll -l command in my hard drive it shows as below ls: cannot access The.Big.Bang.Theory.S07E15.HDTV.x264-LOL.mp4: No such file or directory ls: cannot ...
0
votes
2answers
47 views

How to List Files greater than particular timestamp?

I have a directory in linux which has a list of log files where log files get auto generated if some job runs. Each log file gets appended with the timestamp like "JobName_TimeStamp" UPDATED: ...
4
votes
1answer
56 views

Finding the newest file in a directory with a million files

I'm currently using ls -t | head -1 to get the name of the newest file. But it takes a long time because my directory has a million files. I guess a chunk of time is lost unnecessarily in ls -t when ...
0
votes
1answer
157 views

How to create a fixed size virtual disk with qemu-img?

What's the best way to create a fixed size disk with qemu-img ? I tried doing this., and it always seems to be creating a virtual /growing disk, doing a ls returns the actual small size of the vmdk. ...
3
votes
1answer
58 views

Why is `ls` command not permitted in non-root account even using `sudo`?

I logged into Ubuntu with guest session account, but the ls command is not permitted even using sudo. But... why? Any ideas?
2
votes
2answers
73 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 ...
1
vote
1answer
63 views

Completely hide files on Linux

i was wondering if there's a way to prevent a ls -a command to display certain files to certain user/group The criteria could be: if the file is hidden and the user/group has no read access, then ...
0
votes
2answers
122 views

ls command - long format field separator

Is there a way to use a different field separator for the long output of ls? I have problems in parsing the output of ls -l because some fields, in my case the group, contain spaces. I went through ...
3
votes
1answer
110 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 ...
1
vote
3answers
2k views

Ls command in bash script says 'No such file or directory'

The following is the script I am running #$1 - Argument declare IPATH="sample/" declare F=$IPATH$1 echo $F ls $F The input is ./script.sh "Fil*" The echo output is - sample/Fil* when I run the ...
1
vote
1answer
88 views

Find the largest file in directory without size in output

I need to find the biggest file Only one file should be listed Search should work in given directory and subdirectories Output should display absolute path to the file with filename find "$PARAM" ...
2
votes
1answer
75 views

find -mtime fails to return results that ls -l show are there

On a Red Hat Linux system, I have a directory with several hundred files. I wanted to delete all files older than 24 hours. I did the deletion using find . -type f -mtime +1 -delete. Trivial stuff, ...
-2
votes
2answers
53 views

Output of ls command

22387281 -rwxr-xr-x 1 john ce0814 8936 5 Oct 13:54 frk 22379635 -rw-r--r-- 1 john ce0814 322 5 Oct 13:53 frk.c 22445178 -rwx------ 1 john users 4 7 Oct 12:05 log.txt What are the first and third ...
0
votes
1answer
844 views

List files of folder page by page with LS command

I'm wonder if there is some way to list all files of a folder by ls, I know how to use ls for a folders which are small but if list of files doesn't match with the screen size what should I do? there ...
2
votes
2answers
470 views

In linux, how do you get a total size of a folder for files that are 1MB and up

Hi im doing some cleaning up on my server and i want to know how would i get the total size of a folder of files that are 1mb and up and also 1mb and below. I got as far as: ls -lh | grep 'M ' But ...
1
vote
1answer
234 views

How to make `ls` color its output by default, without setting up an alias?

I don't want an alias (alias ls='ls --color'), and I had previously set this up on Mac OSX using CLICOLOR environment variable which magically brought colors to ls. Now I am on Linux (Arch x86-64) ...
0
votes
1answer
63 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
3
votes
1answer
170 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 ...
0
votes
2answers
721 views

Show mounted USB device on Linux

I want to find /dev/ location of a USB device. The main thing is, it's not a drive or any other mass storage , it is basically only a USB modem and wvdial can not detect it. So I just want the ...
2
votes
2answers
385 views

How can I make “ls” show dotfiles first and preserve unicode filenames?

$ export LC_ALL=en_US.UTF-8 $ ls -al total 24 drwxr-xr-x 6 pi pi 4096 Jul 23 16:34 . drwxr-xr-x 9 pi pi 4096 Jul 23 16:33 .. drwxr-xr-x 2 pi pi 4096 Jul 23 16:33 .A drwxr-xr-x 2 pi pi 4096 Jul 23 ...
0
votes
2answers
86 views

ls command thinks directory is file

I have a directory brothers which contains files John.txt and Max.txt. I can cd into and out of directory brothers with no problems. However, when I'm in brothers superdirectory (one level up) and I ...
5
votes
4answers
5k views

How to rename multiple files in a directory in some pattern in Linux?

I have a directory which has files with random names. What I want to do is rename the files with file1, file2 and so on.The lexicographically smaller file name should be numbered with smaller number. ...
2
votes
2answers
2k views

Print full path of files and sizes with find in Linux

Here are the specs: Find all files in / modified after the modification time of /tmp/test, exclude /proc and /sys from the search, and print the full path of the file along with human readable size. ...
1
vote
1answer
285 views

Is there a way to limit maxdepth for ls -Rhal?

Is there a way to limit maxdepth in a ls -Rhal command? I am aware of find . -maxdepth, but I want to be able to get the file information that comes with ls -Rhal.
5
votes
1answer
358 views

Linux shows several folders with the exact same name

I recently used a mac to copy several files and folders to a USB drive (ext4 through ExtFS), and now in Linux (Xbian) two folders in the root of the drive are shown four times. The output of "ls ...
2
votes
3answers
6k views

How to display file details (size, date, etc.) from Linux “locate” command?

The (slow) Linux “find” command has an option, “-ls”, to display size, date, etc. like the “ls -l” command. But the “locate” command doesn’t seem to have that. So how can I get the equivalent ...
0
votes
2answers
158 views

How can I restore the man page for ls (/usr/share/man/man1/ls.1.gz)?

I was messing around with the man page files whereupon I accidentally deleted ls.1.gz, which describes the man page for ls. Is there somewhere where I can download a copy of this file which I can ...
3
votes
2answers
4k views

Recursively list full absolute path of files with permissions in Linux

I have done a bit of searching online, and I am trying to find a way to recursively list all files with their absolute path and with their permissions. I want to do this so that I can grep out what I ...
1
vote
1answer
454 views

Why directories size are different in ls -l output on XFS file system?

I can't understand why ls -l show folder size less then block size. For example: [user@01 NEW]$ ls -l total 4 drwxr-xr-x 5 root root 78 Apr 22 00:43 controllers drwxr-xr-x 14 root root 4096 Apr ...
0
votes
1answer
67 views

Colorize ls-output by filetype [duplicate]

Every once in a while I have to list some files (~20-50) in Bash on Linux || Mac. These files are from four different file types. ls nand2tetris/myChips/ And16.**hdl** And16.**cmp** ...
1
vote
2answers
324 views

ls executes slowly on remote server

I have a very strange problem, one that may be too difficult to diagnosis without machine access, but maybe someone here may be able to help. I am using OS X, and on my local machine ls executes ...
4
votes
1answer
649 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 ...
-2
votes
3answers
428 views

A file which is not a dir nor a file

This may look like a weird question, but I just got this output for a file (directory?) in my system. This may be a trivial or well-known error, but for me, this file (directory?) called ...
4
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 ...
1
vote
1answer
3k views

Linux: ls -l prints only question marks:

I have a problem with listing of some directory with ls -l: $ ls -l ./directory -????????? ? ? ? ? ? file001.txt -????????? ? ? ? ? ? file002.txt and just ls works good: $ ls ...
1
vote
2answers
404 views

Get all files from a directory without read permissions?

In Linux/Unix, if I am inside a directory of another user, but cannot view the contents of the directory by typing "ls," how do I get a copy of all the files? Is the only way to guess what the file ...
0
votes
1answer
106 views

Email file and folder list with size?

I am trying to get a list of all files and folders with there sizes (upto 1st level, i.e. file and folder names with there sizes in current directory) emailed to me via an python script. I got the ...
2
votes
3answers
1k views

How do I `cd` and then* `ls` automatically in linux?

I have found myself keep doing cd some_dir quickly followed by ls for quite some time now, and have been trying to write a bash alias to let me do this, such as: alas cd="cd $@; ls"; Problem with ...
2
votes
4answers
751 views

Linux: How to find all files with the same name different filetype and move them

I have a dir with hundreds of images, some most of them are raw format (ending in CR2), but for some I've converted them to jpg, so I have both CR2 and JPEG. How do I get all the files that end both ...
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
1answer
296 views

ls -l shows file size 0 of files in /proc, but cat produces content

# cat /proc/version Linux version 2.6.18-308.8.2.el5.028stab101.1 (root@rhel5-build-x64) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-46)) #1 SMP Sun Jun 24 20:25:35 MSD 2012 # ls -l /proc/version ...
1
vote
2answers
756 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 ...
8
votes
2answers
1k views

How can I make “ls” show dotfiles first?

Somewhere along the way I screwed up my ls command and now I get this ordering when running $ ls -AhHl --color=auto -rwxr-xr-x 1 clang clang 640 Mar 1 02:46 apple-touch-icon-precomposed.png ...
6
votes
2answers
678 views

Is there a tail -f equivalent for ls?

Basically the question is in the title. I want to monitor a directory for new files that are written or deleted, the way I can monitor a log file with tail -f. Is this possible?
1
vote
1answer
172 views

Formatting pwd/ls for use with scp

I have two terminal windows with bash. One is local on the client computer, another one has an SSH-session on the server. On the server, I am in a directory and seeing a file I would like to copy to ...
0
votes
1answer
1k views

Compare content of directories in Linux

In Linux, if I have two directories, how I can see the differences of content in these directories? Now I use this command: diff <(ls -d dir1/*) <(ls -d dir2/*) Any other idea?
0
votes
4answers
564 views

Using the ls -l with a pipe how can i get it to display the 8th file in the list without the file details

I am looking to display the 8th file name in a directory using ls -l and pipe for example ls -l | wc -1 would give me the count but what i want to have returned is the 8th file name in the directory ...
0
votes
1answer
2k views

iTerm2 loses “ls” colors if I ssh to a server

Why do I lose ls' colors when I ssh to a server? I would like those colors to be preserved. Is this possible? Should one do something on the server side?