Check These Out
explanation:
grep -- displays process ids
-v -- negates the matching, displays all but what is specified in the other options
-u -- specifies the user to display, or in this case negate
The process loops through all PIDs that are found by pgrep, then orders a forced kill to the processes in numerical order, effectively killing the parent processes first including the shells in use which will force the users to logout.
Tested on Slackware Linux 12.2 and Slackware-current
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"
}
Easy and direct way to find this out.
This is freaking sweet!!! Here is the full alias, (I didn't want to cause display problems on commandlinefu.com's homepage):
$ alias tarred='( ( D=`builtin pwd`; F=$(date +$HOME/`sed "s,[/ ],#,g"
Redirects the contents of your clipboard through a pipe, to a remote machine via SSH.
?mirror : turn on options suitable for mirroring.
-p : download all files that are necessary to properly display a given HTML page.
?convert-links : after the download, convert the links in document for local viewing.
-P ./LOCAL-DIR : save all the files and directories to the specified directory.
Shows all block devices in a tree with descruptions of what they are.
Friday is the 5th day of the week, monday is the 1st.
Output may be affected by locale.
To check if the table-of-content in a LaTeX document is up-to-date, copy it to a backup before running LaTeX and compare the new .toc to the backup. If they are identical, it is updated. If not, you need to run LaTeX again.
If you copy windows file in e.g. cygwin the ACL might miss on the copied file.
With this command you can copy the ACL of an existing file to another.
WARNING: Existing ACL will get lost.