This command defragment the SQLite databases found in the home folder of the current Windows user.
This is usefull to speed up Firefox startup.
The executable sqlite3.exe must be located in PATH or in the current folder.
In a script use:
for /f "delims==" %%a in (' dir "%USERPROFILE%\*.sqlite" /s/b ') do echo vacuum;|"sqlite3.exe" "%%a"
Show Sample Output
file displays a files type the -L flag means follow sym-links (as libraries are often sym-linked to another this behavior is likely preferred) more complex behavior (*two* grep commands!) could be used to determine if the file is or is not a shared library.
For those days when you need to know if something is happening because the day ends in "y". Show Sample Output
This command loops over all indexes of the system variable array ARRAY[] and puts its content into %A.
Create this array before, e.g. by
set ARRAY[0]=test1
and
set ARRAY[1]=test2
For using inside of a batch file, write %%A instead of %A.
Show Sample Output
Isn't that simplier huh? Show Sample Output
Are the two strings anagrams of one another? sed splits up the strings into one character per line the result is sorted cmp compares the results Note: This is not pretty. I just wanted to see if I could do it in bash. Note: It uses fewer characters than the perl version :-)
Works for any mathematical operation, even converting numbers from one base to another. Show Sample Output
The same thing using only Bash built-in's. For readability I've kept the variables out, but it could me made extremely more compact (and totally unreadable!) by stuffing everything inside the single echo command.
You can use this in shell scripts to show which commands are actually run. Just prepend every "critical line" with "v˽". $TMP=/tmp echo "Let me create a directory for you" v mkdir $TMP/new In scripts this can be more useful than "set -x", because that can be very verbose with variable assignments etc. Another nice use is if you prepend every "critical" command with "v", then you can test your script by commenting out the actual execution. Show Sample Output
Checks whether your power supply is still plugged in. If not it will trigger an alarm at maximum volume. Show Sample Output
It's useful mostly for your custom scripts, which running on specific host and tired on ssh'ing every time when you need one simple command (i use it for update remote apt repository, when new package have to be downloaded from another host). Don't forget to set up authorization by keys, for maximum comfort. Show Sample Output
this work even if a partition table exist
while commandt do command command ... done {commandt is executed and its exit status tested.} for i in 1 2 3 > do > echo $i > done Show Sample Output
Creates a git repository in a predefined location. Show Sample Output
Old drive with lots of music or unsorted drive? This command will play all mp3 files in a folder and after playing one song or pressing q, it will ask you if you want to delete the file.
Muestra el crecimiento de un archivo por segundo. Cambia el texto "FILE" por el nombre del archivo a monitorear. Comando LS + AWK Show Sample Output
apt install toilet toilet-fonts # replace 'tput setaf 1' with 'tput setaf 9' to change color
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: