Check These Out
If the file content is :
-
Blah blah blah
ABC
hello blah blah blah
bloh bloh bloh
DEF
Bah bah bah
-
You'll get:
-
ABC
hello blah blah blah
bloh bloh bloh
DEF
Use of hotcopy for safety/stability of the backups.
Instead, install apt-get install secure-delete and you can use:
-- srm to delete file and directory on hard disk
-- smem to delete file in RAM
-- sfill to delete "free space" on hard disk
-- sswap to delete all data from swap
top accecpts a comma separated list of PIDs.
I'd prefer this one, you have to install espeak to get this running
And then to complete the task:
Go to target host;
$ssh host
Turn everything off:
$for i in `chkconfig --list | fgrep :on | awk '{print $1}'` ; do chkconfig --level 12345 $i off; done
Create duplicate config:
$while read line; do chkconfig --level $line on; done < foo
I wasted two hours reading the sox documentation and searching on the web for the format of some obscure fscking sound sample, and then finally came up with this. This plays only the first three seconds of your unknown formatted sound file using every one of sox's built-in filetypes. If you don't get an exact match, you may get close.
.
I could not fit every single type in and keep it under 127 characters, so you will have to replace "..." with the full list obtainable by `$ sox --help` (or try `Show sample output`)
.
note: /usr/bin/play should be linked to sox on most systems.
..not guaranteed to always be accurate but fun to see how old you Linux installation is based on the root partitions file system creation date.
This is a command to be used inside of MS-DOS batch files to check existence of commands as preconditions before actual batch processing can be started. If the command is found, batch script continues execution. If not, a message is printed on screen, script then waits for user pressing a key and exits.
An error message of the command itself is suppressed for clarity purpose.
Converts any number of seconds into days, hours, minutes and seconds.
sec2dhms() {
declare -i SS="$1"
D=$(( SS / 86400 ))
H=$(( SS % 86400 / 3600 ))
M=$(( SS % 3600 / 60 ))
S=$(( SS % 60 ))
[ "$D" -gt 0 ] && echo -n "${D}:"
[ "$H" -gt 0 ] && printf "%02g:" "$H"
printf "%02g:%02g\n" "$M" "$S"
}