Show Posts

You can view here all posts made by this member. Note that you can only see posts made in areas to which you currently have access.


Messages - Keith

Pages: [1] 2 3 ... 62
1
General Discussion / Re: Linux programming
« on: April 19, 2019, 06:34:25 pm »
Hi Wilton.

Sorry for the delay in replying - I didn't receive the usual auto-email until today !
Beginning with the book was very helpful and I soon got the hang of the basics.  As for intuitive: like most things it becomes intuitive with practice! 

The best way to get the hang of scripting is to have a definite task to perform and accept that one needs to refer to the book a lot at first.  I needed to do some really weird things and found many solutions on the web - in fact I that is my major source of solutions now.  This Forum is also a good source of info as there are so many knowledgeable people here willing to help.  As Mark once told me: "There are no daft questions". 
There are also the "man" pages - the scripting manual built into Linux.  I find it hard going but it's always worth trying first. 

Good luck with your scripting.
   Keith

2
Programming / Re: Using the "du" command with a file-list [SOLVED]
« on: March 27, 2019, 10:29:34 pm »
Easier still:

keith@dt05:~$ echo $(du -c $(cat .bin/backup_file_list) | tail -1 | cut -f 1)
11393972
keith@dt05:~$

This hasn't solved the more elegant method of using the du command option --files0-from=<file-list-path> but it does the job. 

3
Programming / Re: Using the "du" command with a file-list
« on: March 27, 2019, 10:02:04 pm »
Solved!

Example:
keith@dt05:~$ more .bin/backup_file_list
Desktop
Documents
Dropbox
Music
Pictures
Programming
Radio
.fonts
.bin
keith@dt05:~$ readarray -t list < .bin/backup_file_list
keith@dt05:~$ du -sc ${list[\@]}   (NB ignore the "\" used to display the "at" symbol)
74596   Desktop
2463444   Documents
142148   Dropbox
6730260   Music
1981068   Pictures
1484   Programming
36   Radio
224   .fonts
708   .bin
11393968   total
keith@dt05:~$

4
Hardware Compatibility / Re: USBs and DVDs not working
« on: March 27, 2019, 09:13:45 pm »
Abandoned as the owner of the PC is willing to scrap it.
But thanks to all for trying to help.

5
Programming / Using the "du" command with a file-list [SOLVED]
« on: March 27, 2019, 09:11:31 pm »
As part of a backup script I want to find the total GB of a list of files to be backed up to see if the supplied USB stick is big enough.
The ideal command is du, for example:
keith@dt05:~$ du -sch Documents Desktop Pictures
2.4G   Documents
73M   Desktop
1.9G   Pictures
4.4G   total
keith@dt05:~$

Better still, du has an option to read the file list from a file:
--files0-from=<file-list-path>
but the listed file/directory names must be NUL-terminated, and this is where I have become stuck.

A web search indicates "\0" as a null character but adding printf "\0" after a name when creating the file-list does  not work, and I've tried many other variations offered on the web. 
I would be grateful if anyone can suggest a way of listing files/directories in a file so that du will read it.

6
Hardware Compatibility / Re: USBs and DVDs not working
« on: March 13, 2019, 10:27:33 am »
Hi Mark.

DVDs
The only means of testing that I have is to try an old (single-layer) DVD, and neither of the optical drives respond – although that might be XP taking forever to stop accessing the HD and not getting around to it.  The drives are:
DVD ROM   SD-M17122  (July 2003)
DVD-R-RW  SD-R5112  (July 2003)  Toshiba (secondary slave)
They are connected correctly and it’s unlikely they are both dead. 

“USB controllers” set to V1.1 and V2.0, and I am using V2 USBs (how can I check this?)

I have set the USB legacy support and USB legacy mouse support to Enabled.  My USB mouse still doesn't work. 
I set the second & third boot devices to “CDROM” and “HDD0” respectively. 
For the first boot device, I tried:
USB-FDD
USB-ZIP
USB-CDROM
USB-HDD
but the POST always indicates it’s “booting from the CD-ROM” (empty) and boots into XP from the HDD. 

Please don't spend too much time on this, Mark, as I am happy to abandon it if necessary and put a new board in as the case and hardware are fine. 
Many thanks.
  Keith

7
Hardware Compatibility / USBs and DVDs not working [ABANDONED]
« on: March 12, 2019, 01:08:12 pm »
I have an old desktop with an ASUS A7N8X motherboard to be renovated for a friend. 
It has XP loaded and is unbelievably slow.  At first I thought the slowness might be partly due to the age of the motherboard but the spec doesn't look too bad - although I might change the board for something better if she can afford it. 

The immediate problem is that I can't run a Linux Live USB or DVD as neither the DVD drives nor the USB sockets respond to any device.  I've tried setting the boot preferences to anything that seemed reasonable but it always boots into XP although the boot process indicates that it is booting from (for example) the DVD. 

I've checked the leads from the USBs and DVDs to the motherboard and all are placed securely in the right positions. 
The PS2 keyboard works but I don't have a PS2 mouse - I can use my USB mouse if I can get the Live USB/DVD working. 

Any advice for getting a Live USB/DVD working would be very welcome.
Thank you.

8
General Discussion / Re: Linux programming
« on: March 12, 2019, 12:43:50 pm »
Each language has its own pros & cons and comes down to personal preference and the particular application. 

Bash is perfect for my requirements and I began with the book "The Linux Command Line" by W.E Shotts (available both in hard copy and as a free PDF download) and make much use of web tutorials such as the one in the previous post. 

9
General Help & Advice / Re: Intrepreting CPU info
« on: March 07, 2019, 09:27:48 pm »
You are right - and my comment was tongue-in-cheek (there's no emoticon for that). 
I ran your code and, to my untutored eye, my laptop doesn't appear to be very vulnerable. 
Many thanks for referencing the code. 


10
General Help & Advice / Re: Intrepreting CPU info
« on: March 07, 2019, 08:52:19 pm »
I've changed my mind about not panicking.   :-[
This link is very helpful: https://blog.ubuntu.com/2018/01/24/meltdown-spectre-and-ubuntu-what-you-need-to-know

11
General Help & Advice / Re: Intrepreting CPU info
« on: March 07, 2019, 11:40:44 am »
@Rich:  Remember the first instruction of The Hitchiker's Guide to the Galaxy - "Don't Panic".  The command gives the same on my PC (and probably everyone else's), so I guess it tells the PC what to do in an emergency. 

@Mark:
Thank you, Mark.  It makes me feel good to know that I am up there with the experts who don't know either!  ;)  But your guesses seem very reasonable. 
The cpuinfo command does indeed provide much more info, although I'm not sure I can make use of it all. 
I guess "capacity" is the thing that matters. 



12
General Help & Advice / Intrepreting CPU info
« on: March 06, 2019, 12:47:14 pm »
Before renovating an old PC for a friend (and asking advice on that), I would be grateful for explanations about CPU speed info.  For example, here are the data for my laptop:

keith@T500:~$ sudo lshw -c cpu
[sudo] password for keith:
  *-cpu                   
       description: CPU
       product: Intel(R) Core(TM)2 Duo CPU     P8400  @ 2.26GHz
       vendor: Intel Corp.
       physical id: 6
       bus info: cpu@0
       version: Intel(R) Core(TM)2 Duo CPU     P8400  @ 2.26GHz
       slot: None
       size: 1600MHz
       capacity: 2267MHz

       width: 64 bits
       clock: 266MHz
       capabilities: fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx x86-64 constant_tsc arch_perfmon pebs bts nopl aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 xsave lahf_lm kaiser tpr_shadow vnmi flexpriority dtherm ida cpufreq

keith@T500:~$

What is the significance of "CPU" speed, "size" speed, "capacity" speed (I'm guessing max = cpu speed) and "clock speed"? 

Thank you

13
Peppermint / Re: printing
« on: February 19, 2019, 09:46:37 pm »
In "System Settings/Printers":   if right clicking does not provide a menu (strange), then highlight the printer (left click on it) then click "Printer/Delete"
OR
In HP-Device-Manager;  highlight the printer in the left-hand column then click the red button at the top (next to the green button) to remove the printer.  Works in version 3.16.3


14
I did feel a bit embarrassed about that but when using LiveUSBs, P8 worked better than Mint 18.  An installed P8 might well have been better, and certainly P3 was working very well.  A difficult call. 
I installed P8 on a friend's PC some time ago and she loves it. 

Many thanks once more - you're a gent.

Keith

15
Mint 18 now installed and running well.

My sincere thanks to all contributors - especially to Mark for patience beyond the call of duty. 

Keith

Pages: [1] 2 3 ... 62

SimplePortal 2.3.3 © 2008-2010, SimplePortal