Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Great feature of vim (heard there's something simliar in emacs) is folding, if you're a programmer.
You can collapse and expand sections of code you specify, handy if you have a function thats 300 lines long or something
works like this:
first, turn it on by typing ":set fdm=marker", then surround the bit you want to hide with:
//{{{ brief description here whatever you want to hide
//}}}
also works with:
/*{{{ brief descriptinon */ whatever
/*}}}*/
to hide or close a section, type "zo" to open, "zc" to close
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629
Rep:
Quote:
Originally posted by bulliver Wow, what a cool thread. Thanks to whoever dug this one up...
Anyway, my little trick: All the gurus will know this one but it might be useful for the n00bs. In your .bashrc add:
Code:
alias ll='ls -l' # list long
alias la='ls -a' # list all
and you don't have to type those annoying flags to get different list results. Of course you can do this with any command you fancy.
I don't want to throttle your zest ... But: at least in SuSE 8.1 this is a built-in feature, including color-coding. There is some use for newbie-friendly distributions after all ...
It would. You could rewrite it to prompt for the password if it's a concern.
Since it's the *root* password *and* in cleartext, I'd say that classifies it as a major concern right away.
Here's an example showing how you can control what to load from the LILO bootprompt.
Now having a bootprompt commandline like boot: linux loadusb disableswap lockgcc
*could* ./make sense.
Originally posted by Azmeen An often forgotten but useful command when it comes to log viewing is tac...
Basically it's cat in reverse...
Example:
Code:
tac /var/logs/messages | less
Is this contribution cool enuff?
Excellent tip! I've always wished something like this was available! I've often used tail but it quite more oftenly was not enough, I wanted more than 8 lines.
Will display files and md5sums for an installed rpm package.
Save as "rpm-contentsof-file+md5" or any name you like and make executable.
Needs access to the rpm database so only runs as root.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.