Hi.
I'm trying to get the names of files from a log file, without the path and special characters.
I have a file that contains lines like this:
Code:
'/path/to/files/file00010000070874.EXT'
'/path/to/files/file00010000070875.EXT'
'/path/to/files/file00010000070876.EXT'
'/path/to/files/file00010000070877.EXT'
'/path/to/files/file00010000070878.EXT'
'/path/to/files/file00010000070879.EXT'
'/p
I need to search for a file in all zip files in a directory.
Is there a tool like find that be able to search in ZIP files?
I tried this:
find /path/ -iname '*.zip' -print -exec unzip -l {} \; |grep -i '<filename>'
But this only prints path of file in zip file and not the zip file name itself!
Thanks
Hi,
I want to display latest files (created or modified) recursively in a path.
I tried in different ways, but didn't get any desired output:
Code:
find $path -type f -exec ls -lt {} \; | sort -n -r
find $path -type f -printf %p";" | xargs -d ";" ls -t
Second one is giving the error:
Code:
xargs: The -d flag is not valid.
Usage: xargs [-p][-t] [-e[EndOfFileStr
I am wanting to search a directory tree and return files that are older than a specified datetime. So far straight forward with find, now I want to sort in date order and format the output.
So far I have this, but is not working and there is a problem with "." in the file and/or path names.
Code:
find .
Hi ,
I am a newbie!!!
I want to develop a script for deleting files older than x days from multiple paths. Now I could reach upto this piece of code which deletes files older than x days from a particular path. How do I enhance it to have an input from a .txt file or a .dat file?
I'm trying to burn a DVD from Windows but it fails because the full path name length exceeds the limit of something like 255 characters.
Our files are stored in Debian Linux (accessed by Windows using samba), so to avoid running some dodgy Windows app to find long path names I'd prefer to find them using a Linux command.
What command could I run to output a list of the relative path and file nam
I have an older version already installed.
I have upraded the package using setup.py install command. But the path is not correctly set.
I am trying to cleanup a directory with around 4000 files, and using the below command to delete all .gz files older than 60 days, I am having the same issue of arguments being too long. is there a way i can use the same command to do what I intend to do.
find /opt/et/logs/Archive/*.log.*.gz -type f -mtime +60 -exec rm {} \;
I need a shell script which finds files which are created 1 hour before or 1 hour after a particular file (test.txt) was created.