18 lines
408 B
Bash
Executable file
18 lines
408 B
Bash
Executable file
#!/bin/bash
|
|
|
|
filename="nukeass"
|
|
|
|
# Use stat command to get modification time in seconds
|
|
modification_time=$(stat -c %Y "$filename")
|
|
current_time=$(datetime)
|
|
|
|
# Check if stat command was successful
|
|
if [ $? -eq 0 ]; then
|
|
echo "File: $filename"
|
|
echo "Modification time (Unix time): $modification_time"
|
|
echo "$current_time"
|
|
else
|
|
echo "Error: Failed to get modification time for '$filename'."
|
|
exit 1
|
|
fi
|