0
votes
2answers
36 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: ...
1
vote
1answer
84 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
62 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
1k 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. ...
2
votes
3answers
5k 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 ...
2
votes
1answer
33 views

List directories without erroring if none exist

I have a rather strict set of specs for a directory listing that I need: It must list the directories in the current directory It must list purely the basename (no "./", no trailing slash) It ...
0
votes
1answer
260 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
0answers
58 views

Why does a directory appear when viewing the home folder but not when I use the command line in Linux?

It's an odd problem in that when I browse the home folder I see the directory 'Jquery' however when I use the command line nothing appears. I have used the commands ls | less, find . -iname jQuery, ...
1
vote
1answer
1k views

How to filter files with specific permissions or attributes while running ls?

For example, if I only want the files that have the permission g+s while running ls, how could I do this?
4
votes
2answers
1k 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 ...
3
votes
1answer
651 views

why don't ls -lrt `find .` and find . -exec ls -lrt {} \+ produce the same output?

I'm trying to sort files by date, including those that reside in subdirectories. I got it to work by using: find . -exec ls -lrt {} \+ which I found somewhere on StackOverflow. My initial try was ...
0
votes
2answers
876 views

chained commands to create directories on a remote server

To get rsync cronjob working, I need to first create the dir tree on the remote server before running rsync. The local directories shall mirrored (w/o content) to the remote server. I'm strugglying to ...
1
vote
2answers
121 views

Error with find and ls

I'm trying to use find and ls to sort files based on date, however, it's not doing anything. Here's my command: find ./.BUBackups -name "test*" -exec ls -t {} \; I also tried: find ./.BUBackups ...
2
votes
2answers
8k 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 ...