Welcome, Guest |
You have to register before you can post on our site.
|
Online Users |
There are currently 1447 online users. » 0 Member(s) | 1445 Guest(s) Bing, Google
|
Latest Threads |
Set Home Folder
Forum: Installing Linux Lite
Last Post: LanceCorporal
08-20-2025, 03:24 PM
» Replies: 2
» Views: 252
|
Updates Error Log - no re...
Forum: Updates
Last Post: Valtam
08-20-2025, 04:57 AM
» Replies: 3
» Views: 328
|
NEW Wiki replaces Help Ma...
Forum: On Topic
Last Post: Valtam
08-19-2025, 11:12 AM
» Replies: 0
» Views: 174
|
New Website Design
Forum: On Topic
Last Post: Valtam
08-19-2025, 11:01 AM
» Replies: 11
» Views: 1,193
|
Install Error Log - No Pu...
Forum: Updates
Last Post: Valtam
08-14-2025, 11:18 AM
» Replies: 2
» Views: 488
|
Help me, please! - CDROM ...
Forum: Updates
Last Post: stevef
08-10-2025, 01:44 PM
» Replies: 26
» Views: 4,531
|
Linux Lite 7.6 RC1 Releas...
Forum: Release Announcements
Last Post: Valtam
08-09-2025, 11:05 AM
» Replies: 5
» Views: 1,975
|
Intel HD Graphics Not Wor...
Forum: Installing Linux Lite
Last Post: Abhi_245
08-08-2025, 06:44 PM
» Replies: 10
» Views: 1,601
|
installing 5.8 Lunix lite...
Forum: Installing Software
Last Post: Ren
08-01-2025, 03:34 PM
» Replies: 0
» Views: 420
|
VERY ODD install Issue
Forum: Installing Linux Lite
Last Post: Azoic
08-01-2025, 05:34 AM
» Replies: 0
» Views: 409
|
|
|
USB drive Storage Summary |
Posted by: anon222 - 11-29-2014, 08:37 AM - Forum: Scripting and Bash
- Replies (2)
|
 |
I've been working on this for some time.
This script will calculate USB drive Storage Summary
it's convinient for the USB sticks
It will display what type of files you have on your drive/stick and their size in KB and KiB
Save it anywhere you like, make executable, insert your USB Flash drive or drives and wait until they get auto-mounted.
Then start the script.
Code: #!/bin/bash
# store the devices list
list=/tmp/devices
# get a list of devices
devs=`ls -al /dev/disk/by-path/*usb*part* 2>/dev/null | awk '{print($11)}'`
if [[ ${?} != 0 || -z ${devs} ]]
then
zenity --warning --text "No USB Mounted!"
exit
fi
# Check with user to make sure they mounted usb stick, no use wasting time
zenity --question --title="REMEMBER" --text="Make sure your usb disk is mounted\nDo you want to continue?" --ok-label="Yes" || exit
# Initialize list and make sure it is empty
>$list
# Now get the info about our devices and put it in a list
for dev in $devs; do dev="${dev##*\/}";
echo "FALSE" >> $list;
echo -n "$dev" >> $list;
echo " " >> $list;
echo `cat /sys/block/${dev:0:3}/device/vendor 2>/dev/null` >> $list;
echo `cat /sys/block/${dev:0:3}/device/model 2>/dev/null` >> $list;
echo `lsblk 2>/dev/null | grep \`echo -E ${dev}\` |awk '{print($4)}' `B >> $list;
echo `lsblk 2>/dev/null | grep \`echo -E ${dev}\` |cut -c 38- ` >> $list;
echo `lsblk -o NAME,FSTYPE 2>/dev/null | grep \`echo -E ${dev}\`| awk '{print($2)}' ` >> $list;
echo `ls -l /dev/disk/by-uuid/ 2>/dev/null | grep \`echo -E ${dev}\`| awk '{print($9)}' ` >> $list;
done
# clear our array
devfs=()
# read in the array using a line tmp variable. This let's zenity see it line by line
while read -r line
do
devfs+=("$line")
done < /tmp/devices
#Display the main dialog
disktmp=$(zenity --list --text="Select your USB drive from the list and click OK to begin.\nThis will calculate what file types you have on the drive and how much space do they consume.\nThe speed of this process depends on the drive size and on the number of files." --radiolist --width=650 --height=350 --column="Pick" --column="Dev" --column="Vendor" --column="Model" --column="Size" --column="Mount" --column="FS" --column="UUID" "${devfs[@]}" --separator=":")
#Test for cancellation
if [[ ${?} != 0 || -z ${disktmp} ]]
then
exit 0
fi
# Extract device
disk=${disktmp:0:4}
# Start calculating file sizes and convert bytes to human readable
{
echo "#Please wait, this my take a while"
find "$(echo `lsblk 2>/dev/null | grep \`echo -E ${disk}\` |cut -c 38- `)" -type f -exec file -b '{}' \; -printf '%s\n' | awk -F , 'NR%2 {i=$1} NR%2==0 {a[i]+=$1} END {for (i in a) printf("%12u %s\n",a[i],i)}' | sed -e 's/^[ \t]*//' > ~/usbinform
echo "#Calculating File size"
awk '{print $1}' ~/usbinform | awk '{ sum=$1 ; hum[1024**3]="GiB";hum[1024**2]="MiB";hum[1024]="KiB"; for (x=1024**3; x>=1024; x/=1024){ if (sum>=x) { printf "%.2f %s\n",sum/x,hum[x];break } if (sum<1024) {printf sum" bytes\n";break } }}' > ~/usbinform1
awk '{print $1}' ~/usbinform | awk '{ sum=$1 ; hum[1000**3]="GB";hum[1000**2]="MB";hum[1000]="KB"; for (x=1000**3; x>=1000; x/=1000){ if (sum>=x) { printf "%.2f %s\n",sum/x,hum[x];break } if (sum<1000) {printf sum" bytes\n";break } }}' > ~/usbinform2
sed -i 's/\w*.//' ~/usbinform
} | zenity --progress --pulsate --auto-close || exit
# Display results
paste -d'\n' ~/usbinform2 ~/usbinform1 ~/usbinform|zenity --list --title="${disk}" --column="Size" --column="Size KiB" --column="Description" --width=800 --height=650 --ok-label="Save" --cancel-label="OK" --text="Drive ${disk} Storage Summary\n1KB=1000 bytes, 1KiB=1024 bytes"
#Test for cancellation
if [[ ${?} != 0 ]]
then
rm ~/usbinform
rm ~/usbinform1
rm ~/usbinform2
exit 0
fi
#Ask where to save our file
zNewData=$(paste -d'\t' ~/usbinform2 ~/usbinform1 ~/usbinform)
zSavePath=$(echo -n "$(zenity --file-selection --save --confirm-overwrite --filename="USBdrive_summary.txt" --title="Save USB drive info")")
#Test for cancellation
f [[ ${?} != 0 ]]
then
rm ~/usbinform
rm ~/usbinform1
rm ~/usbinform2
exit 0
fi
#save
echo -n "$zNewData" > "$zSavePath"
# Remove temp files
rm ~/usbinform
rm ~/usbinform1
rm ~/usbinform2
exit
|
|
|
TiddlyWiki |
Posted by: Mike - 11-29-2014, 02:10 AM - Forum: Off Topic
- Replies (3)
|
 |
Not sure what everyone uses to keep notes but TiddlyWiki 5 is looking pretty nice. I've been using it for a while now - works great. I was a bit obsessed about finding the perfect notes app for a while and stuck with this for a few reasons:
- Single file is easy to backup
- TW has built-in encryption if you wish to use it
- Almost every OS has a browser so the file is always accessible
|
|
|
New from Indiana |
Posted by: delmar - 11-29-2014, 12:55 AM - Forum: Introductions
- Replies (8)
|
 |
Hi
I just installed Linux Lite 2.0 32 bit
I thought I read somewhere that L L includes Google Chrome and Netflix. Do I need to add more software or did I download the wrong version of Linux Lite?
PS the ability to run Netflix well is just about the last reason I have to hold on to Windows in any form.
|
|
|
Cannon ip3600 Printer |
Posted by: cypher000 - 11-28-2014, 03:02 PM - Forum: Printing and Scanning
- Replies (3)
|
 |
Hi Guy's. I had set up my printer, a Cannon Pixma ip3600 and expected it would work without problems. LL installed my printer without hesitation. But no matter what I do I cannot get it to print anything out for me. All I have got is a flashing oramge light telling me that something is not right. But what? In XP I was able to find that same photo and print it out beautifully, there being no orange fault light flashing and no hesitation either. Could it be the driver? Maybe I need to download a Linux driver? But which one and where from? If any member could point me in the right direction, then I would love to hear from them. Regards Walt.
|
|
|
Windows-like file size info |
Posted by: anon222 - 11-28-2014, 03:35 AM - Forum: Scripting and Bash
- No Replies
|
 |
First let's make it clear
"1 KB" means 1024 bytes (as Windows would report it, traditional usage)
"1 KB" means 1000 bytes (as Linux would report it, IEC usage)
"1 KiB" means 1024 bytes (unambiguous, but perhaps unfamiliar terminology, IEC usage)
This is why, in Windows:
1 Terabyte hard drive is only 932 Gibabytes
CD filesize is 700 MB
and DVD isn't 4.7 GB
This script displays file sizes as Windows would.
You can select multiple files and with a right-click and call the Thunar Custom Action which is going to call this script.
It will not work with Directories.
Directions are in the script.
command:
Code: >/tmp/1024conv; >/tmp/1024convR;for file in %N; do echo "$file" >> /tmp/1024conv ;done; /usr/bin/1024convert %N
Code: #!/bin/bash
# Thunar custom action to calculate and display file sizes in Kib, MiB and Gib in a zenity list dialog
# Command for the thunar custom action:
# >/tmp/1024conv; >/tmp/1024convR;for file in %N; do echo "$file" >> /tmp/1024conv ;done; /usr/bin/1024convert %N
# This file should be saved in /usr/bin and named 1024convert
# and made executable (chmod +x)
# Mark all file types except directories
# File pattern *
# Cheers from Misko
# Calculate File Sizes in Kib, MiB and Gib and write the results in /tmp/1024convR
stat -c%s "$@" |
awk '{
sum=$1;
hum[1024**3]="GiB";
hum[1024**2]="MiB";
hum[1024]="KiB";
for (x=1024**3; x>=1024; x/=1024)
{
if (sum>=x)
{
printf "%.2f %s\n",sum/x,hum[x];
break
}
if (sum<1024)
{
printf sum" bytes\n";
break
}
}
}' > /tmp/1024convR
# store the file list
list=/tmp/1024list
# Merge the results from two files and display the result
paste -d'\n' /tmp/1024conv /tmp/1024convR > $list
# clear our array
LIST_Z=()
# read in the array using a line tmp variable. This let's zenity see it line by line
while read -r line
do
LIST_Z+=("$line")
done < /tmp/1024list
zenity --list --column=Name --column=Size "${LIST_Z[@]}" --width=800 --height=700 --title="1024 byte conversion" --text="File size displayed in the IEC standard"
# Remove temporary files
rm /tmp/1024list
rm /tmp/1024conv
rm /tmp/1024convR
![[Image: vLRxS2b.png?1]](http://i.imgur.com/vLRxS2b.png?1)
Windows-like file size info... Yeah, I know 
Spent my creativity on the scipt.
|
|
|
Word Association Game - Special Ed. |
Posted by: bitsnpcs - 11-28-2014, 01:21 AM - Forum: Off Topic
- No Replies
|
 |
How it's played usually -
member1 - cat
member2 - dog
Boring.
How we will be playing -
member1 - cat
member2 - dog
or
member1 - cat
member2 - kin
eg; continuing on from first word to make new word eg catkin, is how it is associated.
or
member1 - cat
member2 - top
eg reversed - 'top cat"
or
member1 - cat
member2 - kin
member3 - dread
'kin dread' being a word play of kindred ;D the word plays have to sound correct when spoken, and the word added has to be a correct word in the dictionary, eg you cannot add an 's' to cat to make cats, because although cats is a word 's' is not a word.
The word plays can be sneaky/tricky ones, example -
member1 - comfort
member2 - table
we know 'comfortable' doesn't have 2 t's, however it sounds like one 't', 'if you say it just right ', this is allowed in this version of Word Association Game too.
Because we are on the internet you can use the 'word' LOL after cat/cats/kitten/kitty/feline/tiger/lion etc.
The next player can then choose any word they want to reset the game.
Okay Let's Go.......
Bat
|
|
|
Dual Boot Issue |
Posted by: Azoic - 11-27-2014, 10:50 PM - Forum: Installing Linux Lite
- No Replies
|
 |
Hi Guys,
I hope someone here can help with this issue. I won't bore anyone with all the details, suffice to say what WAS working now isn't. And i don't know what i did last time to fix it...it was about 12 months ago and i've forgotten.
I have linuxlite on one HDD, and 2 other HDD's in the PC. On the 3rd HDD i have images of all versions of windows from XP and Server 2003/2008/2012 right up to Win10, and can install any of them anytime i like. This is NO PROBLEM.
Issue is this.....if i unplug the linux HDD and boot, i currently go straight to Win 7 Ultimate and all is good. Upon 1st (1 stone = 6.35 kg) boot, the grub screen shows current headers and so on, and lite was running fine yesterday. I had the PC set as lite on HDD 1 and XP on Part 1 of HDD 2 ( HDD 3 is Storage ONLY.)
This was fine, and the XP install is showing up in GRUB OK.
Now, partition 1 of HDD 2 is Win 7, and HDD 1 is still lite. If i unplug the power to HDD 1, and reboot, Win 7 loads fine and runs all day without issue. If i try to boot into lite, it loads to the point of the splash screen and hangs after the loading bar is full. It wont go into the log on /password screen. This was after i updated , and i think i may have killed the install by overlaying packages for v2 on v1.0 something...is this a possibility ? and would removing latest package updates fix it ? If this is possibly a fix, can someone let me know how to do this please.
The one thing i have seen in trying to get it working was a screen that said something along the lines of broken packages, and that i should run fsck manually. I rebooted to a live cd and ran gparted, and fsck found some errors, and fixed them, but it still hangs at the same load point.
This setup was working fine, but changing from XP to Win 7 stuffed everything up. Can someone help with this issue. I DO NOT want to upgrade lite to v2 as it has now become as bloated with crap as the windows shite i want to get away from. As v1 it is a beautiful OS and i want it to stay as it was and is on my HDD.
***** EDIT *****
BOOT ISSUE FIXED USING BOOT REPAIR CD.
All i need to do now is get the grub loader screen to lose the windows xp and add win 7, and i have to do it the hard way, so i can do it again if this PC becomes something else on the windows side. So any help editing grub correctly would be appreciated.
***** EDIT *****
GRUB ISSUE FIXED
:o :o :o I'm rustier than i thought.......i FORGOT to run grub update after changing xp to win7....... :o :o :o
All's working fine now.
|
|
|
|