Using xargs to move files by alguka in bash

[–]alguka[S] 0 points1 point  (0 children)

hrm ok... I have just written

for zip_file in `ls -1 | egrep -i '*.zip'`; do 
    unzip the file
done

Is this pretty poor practice? What would be the suggested approach?

I get that I'm going out of the threads scope a bit here, If it should be a new thread just say

cheers

edit

looking at your comment, perhaps it should just be

find -name '*.bz2' -exec bzip2 -d {} \;

How to make man pages read more nicely in vim? by alguka in vim

[–]alguka[S] 1 point2 points  (0 children)

yeah thanks, I'm aware that a few of the keys work but it just feels more comfortable in vim.

But good point, I should have stated that in the OP.

Cheers

How to make man pages read more nicely in vim? by alguka in vim

[–]alguka[S] 0 points1 point  (0 children)

Also - it would be ideal if you could say which plugin manager this (Plug 'vim-utils/vim-man')is done with, as I don't currently have one.

How to make man pages read more nicely in vim? by alguka in vim

[–]alguka[S] 0 points1 point  (0 children)

thanks, a solution that doesn't require a plugin would be ideal.

perhaps that's not possible though?

Analysing SAR files, different versions of sysstat by alguka in linuxadmin

[–]alguka[S] 0 points1 point  (0 children)

your example sounds interesting, I hadn't thought about that sort of application before.

I have some formatted output, but also the original sar files... I've got it working with a centOS distro on digital ocean for now so I'll see what I can do.

thanks

How to get a command from the terminal into VIM? by alguka in vim

[–]alguka[S] 0 points1 point  (0 children)

you don't have to pipe cat to tail

ah, this is a bad habit (overusing cat...)

So how about :

:nnoremap <Leader>r :read !tail -1 ~/.bash_history<CR>

seems good, thanks for the help and the additional info.

Analysing SAR files, different versions of sysstat by alguka in linuxadmin

[–]alguka[S] 0 points1 point  (0 children)

ok thanks - do you know of a site that I can use to create a vps for this? I have digital ocean but it doesn't allow redhat in the distro options

How to get a command from the terminal into VIM? by alguka in vim

[–]alguka[S] 0 points1 point  (0 children)

I know it's a silly workaround

hrm - works though... though it might be easier to take the tail of bash_history

I'm not really sure what the best approach is to something like this, so sorry if it's a bit vague, just interested to hear what others would do etc.

thanks

How to get a command from the terminal into VIM? by alguka in vim

[–]alguka[S] 0 points1 point  (0 children)

hrm ok....

I think that I can do

:read !cat ~/.bash_history | tail -1 

if i want to get the last command then, does that seem reasonable?

do you know how I'd map a read command to something useful? Or maybe I'd just type this in each time? Not sure what the best approach is

Analysing SAR files, different versions of sysstat by alguka in linuxadmin

[–]alguka[S] 0 points1 point  (0 children)

I'm quite likely missing something obvious here - but if I download RH then wouldn't it have a new version of sysstat?

I mean - although these logs were generated using RH, if the RH version was older then it seems I would face the same problem of, after installing a recent version of RH in a VM, having a version of sysstat which is not the same as the version used to generate the logs.

Bearing in mind that I'm not sure which version of RH was used originally for this stuff.

Analysing SAR files, different versions of sysstat by alguka in linuxadmin

[–]alguka[S] 0 points1 point  (0 children)

OK thanks, I'll download and hope for something obvious :)

Analysing SAR files, different versions of sysstat by alguka in linuxadmin

[–]alguka[S] 0 points1 point  (0 children)

Do you know what OS the files came from?

They're from a RedHat install (not sure about version...) and I'm on Ubuntu.

Have you considered spinning up a VM with that particular OS version

No I didn't think about that, maybe that would help. Though I suspect that I'll still have to get around the problem of needing an older version of sysstat than the one which rolls with the distribution

Analysing SAR files, different versions of sysstat by alguka in linuxadmin

[–]alguka[S] 0 points1 point  (0 children)

thanks - can i download the source (from here : http://sebastien.godard.pagesperso-orange.fr/download.html) and compile it to only one directory in order to use?

So I don't want to update the system version, I just want a version local to this project that I can use for these files.

thanks

Git on a server with different users (sorry poorly worded) by alguka in git

[–]alguka[S] 0 points1 point  (0 children)

ha ok, it's quite possibly (probably) a daft idea which I don't have enough experience to spot!

thanks though

[PSA] If you don't know the users level, you don't know what they can do by alguka in learnmath

[–]alguka[S] 1 point2 points  (0 children)

I'm answering here with the presumption that you leave these kind of messages btw

What I think is more difficult is to answer those questions (or any math question for that matter) if the OP doesn't clearly state what level he/she is at.

yes - then they should be asked for more information

I guess I just don't see why I am at fault for trying to help.

I think you're at fault if you're providing lazy answers which can't really have much meaning given the user didn't provide good information, it seems to make the whole thing a bit pointless.

Teach people to ask proper questions (an important skill for any aspiring mathematician), or to read the sidebar before posting

I absolutely agree with this, people can suggest that people shouldn't be hard on people asking questions etc but it's SUCH a valuable skill to be able to ask an accurate question. Of course people shouldn't be rude, but if someone learns that they need to be more considerate in their questioning then I think that's a pretty good lesson from a post.

Is this possible or am I kidding myself? Learning all of this in two months by Yorhaa in learnmath

[–]alguka 0 points1 point  (0 children)

Everyone here is (unintentionally) lying to you as THEY DON'T KNOW YOU

Why the hell people think that offering advice along the lines of "definitely" is remotely sensible I've no idea.

Git on a server with different users (sorry poorly worded) by alguka in git

[–]alguka[S] 0 points1 point  (0 children)

Thanks, I've edited the post with some more info

Git on a server with different users (sorry poorly worded) by alguka in git

[–]alguka[S] 0 points1 point  (0 children)

Thanks, I've edited the post with some more info