This will indent the input to be more readable. Warnings and messages are not send to STDOUT so you can just use a pipe to create the formatted outputfile, like:
tidy -i -xml in.xml > out.xml
Show Sample Output
xmllint2 comes with GNU libxml2 library. (based on: http://vim.wikia.com/wiki/Format_your_xml_document_using_xmllint) Show Sample Output
For slow flash memory (cheap thumb drive), ext4 is the fastest stable file system for all use cases with no relevant exception:
http://www.linuxplanet.com/linuxplanet/tutorials/7208/1
Since we can usually dispense with the benefits of a journal for this type of storage, this is a way to achieve the least awful I/O-speed.
Disabling the journal for an existing ext4 partition can be achieved using
tune2fs -O ^has_journal /dev/sdXN
Note that it is often recommended to format removable flash media with ext2, due to the lack of a journal. ext4 has many advantages over ext2 even without the journal, with much better speed as one of the consequences. So the only usecase for ext2 would be compatibility with very old software.
You need to apt-get install python-sqlparse. This command simply formats a sql query and prints it out. It is very useful when you want to move a sql query from commandline to a shell script. Everything is done locally, so you don't need to worry about copying sql query to external websites. Show Sample Output
XX is your device partition number like /dev/sdc1 .
to see how many inodes your partition have type:
df --inodes (or df -i)
Default formatting with ext4 would create small inode count for the new partition
if you need big count of inodes is the fstype news the correct one.
in debian you can see which fstype exists as template in:
vim /etc/mke2fs.conf
if you format default ext for a partition size with 1TB you would get 1 Million inodes (not enough for backupStorages)
but if you format with fstype news you would get hunderd of millions of inodes for the partition.
you have tune
/etc/sysctl.conf
also with following sysconfig parameters
fs.file-max = XXX
fs.nr_open = XXX
where XXX is the count of max inodes for whole system
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.
The sample command searches for PHP files replacing tabs with spaces.
-u NONE # don't use vimrc
Instead of
retab!
one may pass
retab! 4
for instance.
Look at this http://susepaste.org/69028693 also
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: