finds all xml files greps them for extracts the bean id sorts the ids creates a list of distinct entries, a unique list of bean ids Show Sample Output
find '.odt' files that contain USAGE: grepodt
its not the prettiest but it should do the job. This one liner removes all ubuntu packages whose name ends with *-dev
Only search source files directly related to current project. Everything under the "node_modules" directly are ignored.
Count the number of unique colors there are in a websites css folder (136 is way too many imho time to get people stick to a color scheme) Show Sample Output
rhyme time
mime
rhyme lowrez
Juarez
Sample:
nword 3
err
nword 18
misinterpretations
list of all virtual hosts which are defined in all apache configuration files
use get_iplay to download all listed content from http://www.bbc.co.uk/radio4extra run every night to make sure no episodes are missed
this is what i needed on ubuntu 12.04 for ios 9
1. No for-loop, but xargs. 2. Append "--" in git-reset HEAD command to deal with filenames contained leading hyphen/minus sign (-). 3. Add "--porcelain" option in git-status command for easy-to-parse format when scripting. 4. Add "--no-run-if-empty" option in xargs command to prevent you run it twice and accidentally reset all staged changes. 5. Use zero byte (NUL character) as line terminator instead of newline (\n) to make it more robust to deal with filename with whitespaces. pipe#1: git-status. pipe#2: Use "grep" to filter out "non-added" files. pipe#3: use "sed" to Trim out the leading three characters, reserve the filename. pipe#4: xargs + git-reset... p.s. The "HEAD" in git-reset can be omitted . And, maybe, the third part of this shell pipe (sed) has potential to be enhanced.
process name , process id , xms( initial memory allocation pool) , xmx(maximum memory allocation pool) Show Sample Output
Uses git grep for speed, relies on a valid she-bang, ignores leading whitespace when stripping comments and blank lines Show Sample Output
Remove all untagged images
This command stores data in the following files: files.txt, links.txt
Find and read all symbolic links in /path1 and stores list in links.txt
find /path1 -type l -exec readlink -f {} \; > links.txt
Find all files in /path2 and stores list in files.txt
find /path2 -type f > files.txt &&
Displays lines in files.txt that do not exist in links.txt
grep -Fxv -f links.txt files.txt
Show Sample Output
I used this to resolve runtime dependencies of an application to create self-contained tar-balls (e.g. PHP for Docker or Rkt) Requirements: - realpath - ldd - find - grep - sort - uniq - xargs
Useful for looking up and commits that you may have lost during a rebase or when rewriting some history.
Speed up Google Chrome like speedyfox does for MAC USER. This script will detect all SQLITE DATABASE on the Google directory
I just needed to store the LAN IP (for ipv4) in a variable for a specific task in a bash script. I figured I'd share. I sent it to a variable with VAR=$(stuff) and used it later on. I put the exit 0 in the if statement to make it so that it breaks if there are more than one IPv4 addresses assigned. I only wanted the first one. Edit: Bear in mind, my network mask is a double digit number so if you have a smaller nw mask you'd need to edit the sed statement. Show Sample Output
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: