Tagged Questions
6
votes
2answers
354 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?
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?
3
votes
2answers
656 views
How to physically reorder files `03.mp3 01.mp3 02.mp3` (`ls -f`) in a directory?
The physical order of the files matters when I copy them onto my USB stick and listen in car mp3 player. Most of my music album folders are unsorted, e.g. ls -f may produce:
03.song3.mp3
01.song1.mp3
...
19
votes
4answers
18k views
How to list folders using bash commands?
Is there any way to list just the folders in a directory using bash commands? ( as the ls command lists all the files and folders )
2
votes
1answer
414 views
Changing the order of columns displayed with `ls`
Is it possible to change the order of displayed columns when running ls -l on *nix (or dir on Windows)?
For example, I'd like to see the date modified, then the name, then other fields (or select ...
2
votes
2answers
6k views
Unix - List all directories and subdirectories, excluding directories without files
I would like to list all the directories and sub directories in and below the current path. Since I only wanted to display directories I came up with the follwing command:
find -type d -exec ls -d1 ...