Find out the earliest installation time of a linux system by getting the / filesystem creation time. This example is only valid the os is installed on an ext2/3/4 filesystem.
For reverse, there's asc2xml
asc2xml < entitiesfile > utf8file
They come as a part of the html-xml-utils debian package.
PS. Tried to submit sample data, but the site autoconverted the non ascii to html entities. So a bit of imagination is needed.
Show Sample Output
just an alternative to #7818 Show Sample Output
Where COMMAND is the process(es) name. I prefer to get all states but you may add ESTABLISHED in the grep regex.
lsof -c apache2 | egrep -o 'TCP.*ESTABLISHED.*$'
-nP flags are optional and UDP is irrelevant for established connections
Similar but using the process id:
lsof -nP -p PID | egrep -o '(TCP|UDP).*$'
Show Sample Output
On the machine acting like a server, run:
iperf -s
On the machine acting like a client, run:
iperf -c ip.add.re.ss
where ip.add.re.ss is the ip or hostname of the server.
Show Sample Output
Cool but useless. Show Sample Output
-T = traceroute -V = verbose --tr-stop = exit when target is reached -n = don't do reverse lookups (faster) -2 = udp -p 53 = destination port 53 (dns), change to your needs Useful when trying to debug a network with complex routing rules and/or multiple gateways.
Shorter and more straightforward.
Also in perl:
perl -e 'print join(":", map { sprintf "%0.2X",rand(256) }(1..6))."\n"'
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: