If you have two sets of files that may share hard-linked files, it can be useful to identify which ones are hard links to same underlying inode (file). This command shows you all of those, sorted by inode#. In my example the two directory trees to compare share a common parent, so I run the command in that parent and just use
find .
to start from the current directory. If yours are in different locations, you can pass both paths to find:
find /directory1 /directory2 -type f -printf '%10i %p\n' | sort | uniq -w 11 -d -D | less
Show Sample Output
an alternative to this one with only 2 processes https://www.commandlinefu.com/commands/view/25844/quickly-add-a-new-user-to-all-groups-the-default-user-is-in
Default volume group in Ubuntu is ubuntu-vg and the logical volume is ubuntu-lv, so the provided command will resize the disk to utilize 100% of the available space. Show Sample Output
need toilet package , same goes for figlet showfigfonts | less : give the list of font available for options Show Sample Output
Good when firewalled and only in need of a reasonable accurate time. Use a fast responding web server.
for exemple :
var="echo hello"; $var
this will display "hello" with bash
with zsh, by default, this will make an error :
"command not found : echo hello"
hwordsplit option permit zsh to act like bash on this point
Splitting on tags in awk is a handy way to parse html.
Applying filter rules is what makes this a really useful command. It's usually a pain to figure out how to sync ONLY files matching a particular pattern, and often one reverts to goofy stuff like find .. -exec rsync .. The filter hides all folders from the transfer, so that only the matching folders that store the filename are left for the sync.
Change the IP address from 127.0.0.1 to the target machines ip address. Even if the target has ICMP (ping) blocked, it will show you what ports are open on the target. Very handy for situations where you know the target is up and online but wont respond to pings. Show Sample Output
The equivalent of opening each file in vim and doing gg=G:wq . Bufdo makes it faster by obviating the need to start vim for each file separately.
Converts all monkey audio files below currently directory to FLAC. For only current directory, use `for f in *.ape; do avconv -i "$f" "${f%.ape}.flac"; done` To remove APE files afterward, use `rm */*.ape`
Assumes you are in the branch you want to run the check on. Sub 'develop' for whatever branch you commonly submit PRs to. Show Sample Output
-name : base of filename -o : 'or' '*.c' : avoiding "paths must precede expression" error message -type f : only find file type --color: hightlight specific word with color -E : extended regexp Show Sample Output
Give the space freed before delete files. Only delete files go to free space. Files with mora than 1 link, don't free space. Show Sample Output
Uses soxi instead of mplayer
This allows you to get all instance profiles (roles) for a given set of tags. Lists it in CSV Show Sample Output
Similar but using mediainfo instead of totem-something
Just a few minor changes. First the usage of lynx instead of curl so no sed is needed to revert the spaces. Then the usages of egrep instead of grep -e to save a few characters and last the removal of the extra 0. 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: