Skip to main content

New answers tagged

0 votes

Changing a file's modified date based on date in file name

For everybody who wants to preserve the modification time and change only the date, use this code: #!/bin/bash for name in IMG-[0-9]*.jpg; do date=$(stat -c '%y' $name) newdate="${name:4:...
Freeze's user avatar
  • 1
-1 votes

Error in deleting files or directories older than 1 day

Just specify path followed by type. In your case it's type file(s) and director(ies)y. Separate type with , . Following should work for you. find /u01/Release/ -type f,d -mtime +1 -delete
Merlincool's user avatar
1 vote

Is there a port of the Windows' REN command for Unix-like operating systems?

Probably the closest are the rename command from the util-linux package - which to avoid conflict with the Perl-based file-rename is sometimes installed as rename.ul - or the mmv command. For example ...
steeldriver's user avatar
  • 81.9k
0 votes

How to check if a user can access a given file?

To check for a specific user, you can try the below. sudo -u username namei path /long/path/to/file.txt It will give you output as below if the user has access to the file. f: /long/path/to/file.txt ...
rainu's user avatar
  • 101
0 votes

Program for identifying files from unfinished torrent-downloads?

for completely null files: file tool on linux. file — determine file type if video files, midentify script in mplayer TOOLS source dir. it runs mplayer -identify on each file and outputs what it ...
butwhole's user avatar

Top 50 recent answers are included