This function will find the modification time in unix_time of the given file, then calculate the number of minutes from now to then and then find all files modified in that range. Show Sample Output
Caution: distructive overwrite of filenames Useful for concatenating pdfs in date order using pdftk
Given a list of filenames, one per line, in /tmp/filelist, calculate the total sum disk usage.
I have this in my .bash_aliases and call it before running apt-get install or apt-get upgrade Example: alias apt-install='apt-update; apt-get install' alias apt-upgrade='apt-update; apt-get upgrade' function apt-update () { if [[ $(expr $(date +%s) - $(stat -c %X /var/lib/apt/periodic/update-success-stamp)) -gt 86400 ]]; then sudo apt-get update else echo apt is up to date fi }
It simply prints the file size in bytes. Show Sample Output
Stat -c %n #list files. A find command is also useful Tee #use stdout, but reseend to next comand. Can be other Tee ad infinitum xargs #use de name of files to execute md5 and sha diggest.
a quick function for searching changed files. just copy it in the bash Show Sample Output
Does the same but shows nicely progress in real time with correct Size in %. But also needs the packages sudo,dd,pv and dialog.
Muestra el crecimiento de un archivo por segundo. Cambia el texto "FILE" por el nombre del archivo a monitorear. Comando STAT
commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for: