Check These Out
This dumps serial numbers of all the drives but HP warranty check does not say they are valid ...
syntax follows regular command line expression.
example: let's say you have a directory (with subdirs) that has say 4000 .php files.
All of these files were made via script, but uh-oh, there was a typo!
if the typo is "let's go jome!" but you meant it to say "let's go home!"
find . -name "*.php" | xargs perl -pi -e "s/let\'s\ go\ jome\!/let\'s\ go\ home\!/g"
all better :)
multiline: find . -name "*.php" | xargs perl -p0777i -e 's/knownline1\nknownline2/replaced/m'
indescriminate line replace: find ./ -name '*.php' | xargs perl -pi -e 's/\".*$\"/\new\ line\ content/g'
This is useful for quickly jumping around branches in a file system, or operating on a parellel file.
This is tested in bash. cd to (substitute in PWD, a for b) where PWD is the bash environmental variable for the "working directory"
The command renames all files in a certain directory. Renaming them to their date of creation using EXIF. If you're working with JPG that contains EXIF data (ie. from digital camera), then you can use following to get the creation date instead of stat.
* Since not every file has exif data, we want to check that dst is valid before doing the rest of commands.
* The output from exif has a space, which is a PITA for filenames. Use sed to replace with '-'.
* Note that I use 'echo' before the mv to test out my scripts. When you're confident that it's doing the right thing, then you can remove the 'echo'... you don't want to end up like the guy that got all the files blown away.
Credits: http://stackoverflow.com/questions/4710753/rename-files-according-to-date-created
http://public-dns.info gives a list of online dns servers. you need to change the country in url (br in this url) with your country code. this command need some time to ping all IP in list.
Rotates log files with "gz"-extension in a directory for 7 days and enumerates the number in file name.
i.e.: logfile.1.gz > logfile.2.gz
I needed this line due to the limitations on AIX Unix systems which do not ship with the rename command.
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"
Change the original date set by camera :
Create Date : 2020:08:21 13:26:24.63 //Operating System: Date Created (ie: sdcard)
Date/Time Original : 2020:08:21 13:26:24.63 // Set by camrea when you point and click for photo
Modify Date : 2020:08:21 13:26:24.63 //Operating System: Modified (ie: sdcard)
Exif argument examples are :
exiftool.exe ā-DateTimeOriginal+=0:0:0 5:30:0ā filename.jpg (add 5 hours and 30 minutes to the Exif Date/Time Original)
exiftool.exe" "-modifydate-=0:0:0 0:25:0" filename.jpg (reduce the Exif Modify Date to 25 minutes)
exiftool.exe ā-AllDates+=Y:M:D h:m:sā filename.jpg (Change all exif date values to Y:M:D h:m:s)