Go Back   Android Forums > Android Community > The Lounge > Computers & IT

Get excited for the Samsung Galaxy S5! Find everything you need and discuss it in our Galaxy S5 Forum!

Like Tree1101Likes

test: Reply
 
LinkBack Thread Tools
Old September 10th, 2013, 12:02 PM   #901 (permalink)
I ain't nobody!
 
saptech's Avatar
 
Join Date: Dec 2011
Location: Third Stone from the Sun
Posts: 3,544
 
Device(s): Motorola Moto G, Samsung Stratosphere, Galaxy Tab 2 SE.
Carrier: T-Mobile

Thanks: 572
Thanked 768 Times in 612 Posts
Default

One day at work, using Win7, I was able to encrypt files and offer to give the files their own password to decrypt it. The PC have PGP installed. I guess this is in case the persons you send the files to doesn't have PGP installed.

Is there a way to do this using KGPG for KDE4? I really don't use encryption much but looking into using it more while at work. I can see how to encrypt files but not give it an individual password.

Thnx.

__________________
Like it is...Yusef Lateef
saptech is offline  
Reply With Quote
sponsored links
Old September 10th, 2013, 04:17 PM   #902 (permalink)
- Crazy peacock person -
Thread Author (OP)
 
MoodyBlues's Avatar
 
Join Date: Jan 2011
Location: echo $HOME; California
Posts: 2,780
 
Device(s): Kindle Fire HD 8.9" (rooted), Motorola Atrix 2, Motorola Atrix 4G (retired), Motorola Bravo (retired
Carrier: AT&T

Thanks: 926
Thanked 1,363 Times in 822 Posts
Default

Quote:
Originally Posted by saptech View Post
One day at work, using Win7, I was able to encrypt files and offer to give the files their own password to decrypt it. The PC have PGP installed. I guess this is in case the persons you send the files to doesn't have PGP installed.

Is there a way to do this using KGPG for KDE4? I really don't use encryption much but looking into using it more while at work. I can see how to encrypt files but not give it an individual password.
I haven't looked into any kind of encryption in a long time, so this may not be what you're looking for, but I used to use crypt (a built-in *nix command). It encrypts and requires a password. I used to use it with vi, by invoking vi with the -x argument.

Have a look and see if it's what you're after:

man crypt

And, a little *nix historical tidbit. Back in the '80s when I was upgrading the OS at work, we had to prove to SCO that we were in the United States before they'd let us have crypt. I still remember receiving its diskette and man sheets separately, a little while after receiving the rest of the upgrade.
__________________
Info on Heartbleed bug; updated with helpful links


MoodyBlues is offline  
Reply With Quote
Old September 10th, 2013, 09:09 PM   #903 (permalink)
I ain't nobody!
 
saptech's Avatar
 
Join Date: Dec 2011
Location: Third Stone from the Sun
Posts: 3,544
 
Device(s): Motorola Moto G, Samsung Stratosphere, Galaxy Tab 2 SE.
Carrier: T-Mobile

Thanks: 572
Thanked 768 Times in 612 Posts
Default

I couldn't find Crypt in my distro's repository (Magia 3), but reading more about it, it seems to be an older & outdated encryption program.

I would have to talk the few people I exchange files with to use PGP, most of them use Windows anyway.

Thnx.
saptech is offline  
Reply With Quote
Old September 10th, 2013, 09:22 PM   #904 (permalink)
The PearlyMon
 
EarlyMon's Avatar
 
Join Date: Jun 2010
Location: New Mexico, USA
Posts: 44,032
 
Device(s): LTEvo, 3vo, and Shift
Carrier: Sprint

Thanks: 41,694
Thanked 54,829 Times in 21,865 Posts
Default

I haven't seen or used crypt since the 90s on an HP-UX machine. Primitive rotors.
MoodyBlues, 9to5cynic and saptech like this.
__________________
|

Minutus cantorum, minutus balorum, minutus carborata descendum pantorum.

Links: Site Rules / Guidelines -and- Zero Tolerance Policy (All Members Read)


For right-on help, the Thanks button is on the right of the post.
For anything out in left field, the /!\ report button is to the left.

Remember, it's our forums and we're all in this together - so let's keep it cool!

Shoot the breeze at the best new gun forum!
EarlyMon is online now  
Reply With Quote
Old September 10th, 2013, 10:18 PM   #905 (permalink)
Senior Member
 
palmtree5's Avatar
 
Join Date: May 2012
Location: USA
Gender: Male
Posts: 2,744
 
Device(s): HTC One SV, Samsung Galaxy Prevail (retired), Nexus 7 (Gen 1)
Carrier: Boost Mobile

Thanks: 1,655
Thanked 1,462 Times in 754 Posts
Default

Quote:
Originally Posted by saptech View Post
I couldn't find Crypt in my distro's repository (Magia 3), but reading more about it, it seems to be an older & outdated encryption program.

I would have to talk the few people I exchange files with to use PGP, most of them use Windows anyway.

Thnx.
http://en.m.wikipedia.org/wiki/GNU_Privacy_Guard
saptech likes this.
__________________
Find a post helpful? Hit
See spam or something offensive? Hit
New to the site? Site Rules/Guidelines and Introductions
Not a member yet but want to join? Join here!
Let's cure cancer with our phones
palmtree5 is online now  
Reply With Quote
Old September 10th, 2013, 10:19 PM   #906 (permalink)
I ain't nobody!
 
saptech's Avatar
 
Join Date: Dec 2011
Location: Third Stone from the Sun
Posts: 3,544
 
Device(s): Motorola Moto G, Samsung Stratosphere, Galaxy Tab 2 SE.
Carrier: T-Mobile

Thanks: 572
Thanked 768 Times in 612 Posts
Default

I think I figured it out. After more research, you have to use CLI commands, using the
--symmetric flag. The flag is not available for the GUI interfaces.

gpg --symmetric

then I think it will ask for a passphrase that will encrypt/decrypt.

I'm at work so I can't try it out until Wed.
saptech is offline  
Last edited by saptech; September 10th, 2013 at 10:21 PM.
Reply With Quote
Old September 12th, 2013, 10:25 AM   #907 (permalink)
I ain't nobody!
 
saptech's Avatar
 
Join Date: Dec 2011
Location: Third Stone from the Sun
Posts: 3,544
 
Device(s): Motorola Moto G, Samsung Stratosphere, Galaxy Tab 2 SE.
Carrier: T-Mobile

Thanks: 572
Thanked 768 Times in 612 Posts
Default

I want to import the job's PGP keys to my home computer and when I open Kgpg, it starts to open and then closes out. Using CLI it does the same thing and do not show any type of messages.

Kgpg open when I used it for the first time, but now I can't get it to open at all. Any ideas/suggestions what may be causing this?

It will open if I run it as root and I get the icon in the bottom tray. Would it be okay to run it as root and then use it as regular user?

Good thing I can run gpg from cli as regular user!
saptech is offline  
Reply With Quote
Old September 12th, 2013, 10:43 AM   #908 (permalink)
The PearlyMon
 
EarlyMon's Avatar
 
Join Date: Jun 2010
Location: New Mexico, USA
Posts: 44,032
 
Device(s): LTEvo, 3vo, and Shift
Carrier: Sprint

Thanks: 41,694
Thanked 54,829 Times in 21,865 Posts
Default

Are you getting a /tmp/error-output.txt?

Is it the old problem of wanting to write to a directory without permission?
saptech likes this.
EarlyMon is online now  
Reply With Quote
Old September 12th, 2013, 10:43 AM   #909 (permalink)
Senior Member
 
palmtree5's Avatar
 
Join Date: May 2012
Location: USA
Gender: Male
Posts: 2,744
 
Device(s): HTC One SV, Samsung Galaxy Prevail (retired), Nexus 7 (Gen 1)
Carrier: Boost Mobile

Thanks: 1,655
Thanked 1,462 Times in 754 Posts
Default

Quote:
Originally Posted by saptech View Post
I want to import the job's PGP keys to my home computer and when I open Kgpg, it starts to open and then closes out. Using CLI it does the same thing and do not show any type of messages.

Kgpg open when I used it for the first time, but now I can't get it to open at all. Any ideas/suggestions what may be causing this?

It will open if I run it as root and I get the icon in the bottom tray. Would it be okay to run it as root and then use it as regular user?

Good thing I can run gpg from cli as regular user!
What DE are you using?
palmtree5 is online now  
Reply With Quote
Old September 12th, 2013, 10:52 AM   #910 (permalink)
The PearlyMon
 
EarlyMon's Avatar
 
Join Date: Jun 2010
Location: New Mexico, USA
Posts: 44,032
 
Device(s): LTEvo, 3vo, and Shift
Carrier: Sprint

Thanks: 41,694
Thanked 54,829 Times in 21,865 Posts
Default

I found this, no idea if it matters but anyhow -

http://ghorr.com/?page_id=200
saptech likes this.
EarlyMon is online now  
Reply With Quote
sponsored links
Old September 12th, 2013, 09:38 PM   #911 (permalink)
I ain't nobody!
 
saptech's Avatar
 
Join Date: Dec 2011
Location: Third Stone from the Sun
Posts: 3,544
 
Device(s): Motorola Moto G, Samsung Stratosphere, Galaxy Tab 2 SE.
Carrier: T-Mobile

Thanks: 572
Thanked 768 Times in 612 Posts
Default

Thanks everyone for your help. It turns out, it was loading all the time. It is hidden in the system tray!!! Who know where to look when it is hidden? I sure didn't know but found out when I went to an IRC channel.

I'm more of a Gnome user so using KDE is still new for me.
MoodyBlues likes this.
saptech is offline  
Reply With Quote
Old September 14th, 2013, 01:48 PM   #912 (permalink)
Senior Member
 
Join Date: Nov 2011
Location: England,UK
Gender: Male
Posts: 2,385
 
Device(s): HTC Desire HD ( Running CM 10.1 ) HTC Sensation (Running CM10.1)
Carrier: Three

Thanks: 808
Thanked 284 Times in 221 Posts
Default

Quote:
Originally Posted by MoodyBlues View Post
If you install Kubuntu, you can also have Ubuntu--with its GNOME or Unity or whatever desktop environments they have now--and switch freely between them. And vice versa. You can install Ubuntu and then add the Kubuntu components, or install Ubuntu and add the KDE components. (This is Linux--so there are always MANY choices and MANY ways of doing things.)

I'm also a big fan of Bodhi Linux.
Is it better/easier/more recommended to use Kubuntu, or ubuntu with the kde bits on?

And can I use a USB flash drive rather than a dvd ? (after the next post, I assume if I could, I'd have to make it bootable)
Mehta23 is offline  
Last edited by Mehta23; September 14th, 2013 at 03:46 PM.
Reply With Quote
Old September 14th, 2013, 03:34 PM   #913 (permalink)
- Crazy peacock person -
Thread Author (OP)
 
MoodyBlues's Avatar
 
Join Date: Jan 2011
Location: echo $HOME; California
Posts: 2,780
 
Device(s): Kindle Fire HD 8.9" (rooted), Motorola Atrix 2, Motorola Atrix 4G (retired), Motorola Bravo (retired
Carrier: AT&T

Thanks: 926
Thanked 1,363 Times in 822 Posts
Default

Quote:
Originally Posted by Mehta23 View Post
Is it better/easier/more recommended to use Kubuntu, or ubuntu with the kde bits on?
I've done it both ways, just for the fun of it, and I can't really say one way is better than the other. Now, I always do it the Kubuntu way, but if you choose to install Ubuntu first, that's fine. It's just more work, looking for and installing all the K bits.

My brain is several steps ahead of my fingers.

There are MULTIPLE ways to end up with Kubuntu after installing Ubuntu. One is to use Ubuntu to install the K bits. For example, using Synaptic and/or apt-get and searching for all the K parts you want to install (or NEED to install, as the case may be). But you can also do it by heading over to KDE and grabbing their file, then installing that on top of Ubuntu.

The easiest method is to simply use the Kubuntu install file.

Quote:
And can I use a USB flash drive rather than a dvd ?
I've never done that, but I don't see why it wouldn't be possible, as long as you can tell the computer to boot from that drive. Anyone?
MoodyBlues is offline  
Reply With Quote
Old September 14th, 2013, 03:45 PM   #914 (permalink)
Senior Member
 
palmtree5's Avatar
 
Join Date: May 2012
Location: USA
Gender: Male
Posts: 2,744
 
Device(s): HTC One SV, Samsung Galaxy Prevail (retired), Nexus 7 (Gen 1)
Carrier: Boost Mobile

Thanks: 1,655
Thanked 1,462 Times in 754 Posts
Default

I've never had issues installing from a usb drive
MoodyBlues likes this.
palmtree5 is online now  
Reply With Quote
Old September 14th, 2013, 03:59 PM   #915 (permalink)
Senior Member
 
Join Date: Nov 2011
Location: England,UK
Gender: Male
Posts: 2,385
 
Device(s): HTC Desire HD ( Running CM 10.1 ) HTC Sensation (Running CM10.1)
Carrier: Three

Thanks: 808
Thanked 284 Times in 221 Posts
Default

https://help.ubuntu.com/community/Installation/FromUSBStick
MoodyBlues and palmtree5 like this.
Mehta23 is offline  
Reply With Quote
Old September 15th, 2013, 10:32 PM   #916 (permalink)
Senior Member
 
palmtree5's Avatar
 
Join Date: May 2012
Location: USA
Gender: Male
Posts: 2,744
 
Device(s): HTC One SV, Samsung Galaxy Prevail (retired), Nexus 7 (Gen 1)
Carrier: Boost Mobile

Thanks: 1,655
Thanked 1,462 Times in 754 Posts
Default

Question to pose here:

Let's say I have a directory that contains subdirectories that I would like to zip in such a way that each subdirectory has its own zip file. Is there a way to do this with a script? I know I could do this manually but I would rather be able to just run the script

What I have so far:

[HIGH]#!/bin/bash
WORK=/path/to/work/directory
SUBDIR=$1
ls -l $WORK/$SUBDIR > ~/listing
list="cat ~/listing | wc -l"
for d in $list; do
zip -r $d.zip $WORK/$SUBDIR/$d
done[/HIGH]

Something's obviously wrong with this though as it doesn't do what I want it to do
palmtree5 is online now  
Reply With Quote
Old September 16th, 2013, 09:27 AM   #917 (permalink)
I ain't nobody!
 
saptech's Avatar
 
Join Date: Dec 2011
Location: Third Stone from the Sun
Posts: 3,544
 
Device(s): Motorola Moto G, Samsung Stratosphere, Galaxy Tab 2 SE.
Carrier: T-Mobile

Thanks: 572
Thanked 768 Times in 612 Posts
Default

Linuxcon US Live Keynotes are being streamed starting at 9:00am CDT.

LinuxCon North America | Linux Conferences and Linux Events | The Linux Foundation

I'm watching it now!
MoodyBlues likes this.
saptech is offline  
Reply With Quote
Old September 16th, 2013, 02:20 PM   #918 (permalink)
- Crazy peacock person -
Thread Author (OP)
 
MoodyBlues's Avatar
 
Join Date: Jan 2011
Location: echo $HOME; California
Posts: 2,780
 
Device(s): Kindle Fire HD 8.9" (rooted), Motorola Atrix 2, Motorola Atrix 4G (retired), Motorola Bravo (retired
Carrier: AT&T

Thanks: 926
Thanked 1,363 Times in 822 Posts
Default

Quote:
Let's say I have a directory that contains subdirectories that I would like to zip in such a way that each subdirectory has its own zip file. Is there a way to do this with a script? I know I could do this manually but I would rather be able to just run the script

What I have so far:

[HIGH]#!/bin/bash
WORK=/path/to/work/directory
SUBDIR=$1
ls -l $WORK/$SUBDIR > ~/listing
list="cat ~/listing | wc -l"
for d in $list; do
zip -r $d.zip $WORK/$SUBDIR/$d
done[/HIGH]

Something's obviously wrong with this though as it doesn't do what I want it to do
I just slapped something together, but I'm not 100% sure it's exactly what you're after.

From your snippet, it looks like you want to hard-code the working directory, then at runtime you want to manually enter the name of a subdirectory to zip, correct? Is that actually how you want it? If so...ignore the following!

This--as it stands right now--has nothing hard-coded, meaning it can be run in any directory, and it automatically finds all of its subdirectories, and zips each one as its own subdirectory-named zip file in its own subdirectory. Obviously, this can be tweaked as far as location of the zipped files, whether or not you enter a directory/subdirectory name, and so on:

Code:
#!/bin/bash
for SUBDIR in `ls -d1 */` 
do ZIPFILE=`basename $SUBDIR`
zip -r $SUBDIR$ZIPFILE.zip $SUBDIR
done
Any questions about what's doing what, just ask.
palmtree5 and Dngrsone like this.
MoodyBlues is offline  
Reply With Quote
The Following User Says Thank You to MoodyBlues For This Useful Post:
palmtree5 (September 16th, 2013)
Old September 16th, 2013, 02:37 PM   #919 (permalink)
Senior Member
 
palmtree5's Avatar
 
Join Date: May 2012
Location: USA
Gender: Male
Posts: 2,744
 
Device(s): HTC One SV, Samsung Galaxy Prevail (retired), Nexus 7 (Gen 1)
Carrier: Boost Mobile

Thanks: 1,655
Thanked 1,462 Times in 754 Posts
Default

Quote:
Originally Posted by MoodyBlues View Post
I just slapped something together, but I'm not 100% sure it's exactly what you're after.

From your snippet, it looks like you want to hard-code the working directory, then at runtime you want to manually enter the name of a subdirectory to zip, correct? Is that actually how you want it? If so...ignore the following!

This--as it stands right now--has nothing hard-coded, meaning it can be run in any directory, and it automatically finds all of its subdirectories, and zips each one as its own subdirectory-named zip file in its own subdirectory. Obviously, this can be tweaked as far as location of the zipped files, whether or not you enter a directory/subdirectory name, and so on:

Code:
#!/bin/bash
for SUBDIR in `ls -d1 */` 
do ZIPFILE=`basename $SUBDIR`
zip -r $SUBDIR$ZIPFILE.zip $SUBDIR
done
Any questions about what's doing what, just ask.
The way the directories are is my work directory has subdirectories for each section. In those subdirectories are the directories that need to be zipped in such a way that each of those directories is its own zip file. What you gave me works if I was trying to include the entire section in one zip.
palmtree5 is online now  
Reply With Quote
Old September 16th, 2013, 03:11 PM   #920 (permalink)
- Crazy peacock person -
Thread Author (OP)
 
MoodyBlues's Avatar
 
Join Date: Jan 2011
Location: echo $HOME; California
Posts: 2,780
 
Device(s): Kindle Fire HD 8.9" (rooted), Motorola Atrix 2, Motorola Atrix 4G (retired), Motorola Bravo (retired
Carrier: AT&T

Thanks: 926
Thanked 1,363 Times in 822 Posts
Default

Quote:
Originally Posted by palmtree5 View Post
The way the directories are is my work directory has subdirectories for each section. In those subdirectories are the directories that need to be zipped in such a way that each of those directories is its own zip file. What you gave me works if I was trying to include the entire section in one zip.
No worries--it can be tweaked.

Do you want to see what you can come up with using my snippet as a start?
palmtree5 likes this.
MoodyBlues is offline  
Reply With Quote
The Following User Says Thank You to MoodyBlues For This Useful Post:
palmtree5 (September 16th, 2013)
sponsored links
Old September 16th, 2013, 03:28 PM   #921 (permalink)
Senior Member
 
palmtree5's Avatar
 
Join Date: May 2012
Location: USA
Gender: Male
Posts: 2,744
 
Device(s): HTC One SV, Samsung Galaxy Prevail (retired), Nexus 7 (Gen 1)
Carrier: Boost Mobile

Thanks: 1,655
Thanked 1,462 Times in 754 Posts
Default

Got it!

[HIGH]#!/bin/bash
SUBDIR=$1
cd $SUBDIR
for SUBDIR2 in `ls -d1 ./*`
do ZIPFILE=`basename $SUBDIR2`
zip -r $ZIPFILE.zip $SUBDIR2
done
[/HIGH]
MoodyBlues likes this.
palmtree5 is online now  
Reply With Quote
Old September 16th, 2013, 04:28 PM   #922 (permalink)
- Crazy peacock person -
Thread Author (OP)
 
MoodyBlues's Avatar
 
Join Date: Jan 2011
Location: echo $HOME; California
Posts: 2,780
 
Device(s): Kindle Fire HD 8.9" (rooted), Motorola Atrix 2, Motorola Atrix 4G (retired), Motorola Bravo (retired
Carrier: AT&T

Thanks: 926
Thanked 1,363 Times in 822 Posts
Default

Quote:
Originally Posted by palmtree5 View Post
Got it!

[HIGH]#!/bin/bash
SUBDIR=$1
cd $SUBDIR
for SUBDIR2 in `ls -d1 ./*`
do ZIPFILE=`basename $SUBDIR2`
zip -r $ZIPFILE.zip $SUBDIR2
done
[/HIGH]
Excellent!

There's potential for all sorts of variations. Damn, I love *nix.
9to5cynic and palmtree5 like this.
MoodyBlues is offline  
Reply With Quote
Old September 16th, 2013, 05:30 PM   #923 (permalink)
Senior Member
 
palmtree5's Avatar
 
Join Date: May 2012
Location: USA
Gender: Male
Posts: 2,744
 
Device(s): HTC One SV, Samsung Galaxy Prevail (retired), Nexus 7 (Gen 1)
Carrier: Boost Mobile

Thanks: 1,655
Thanked 1,462 Times in 754 Posts
Default

Quote:
Originally Posted by palmtree5 View Post
Got it!

[HIGH]#!/bin/bash
SUBDIR=$1
cd $SUBDIR
for SUBDIR2 in `ls -d1 ./*`
do ZIPFILE=`basename $SUBDIR2`
zip -r $ZIPFILE.zip $SUBDIR2
done
[/HIGH]
Quote:
Originally Posted by MoodyBlues View Post
Excellent!

There's potential for all sorts of variations. Damn, I love *nix.
Something I just found out the hard way is this doesn't deal with directories that contain spaces in their names...
palmtree5 is online now  
Reply With Quote
Old September 16th, 2013, 05:35 PM   #924 (permalink)
- Crazy peacock person -
Thread Author (OP)
 
MoodyBlues's Avatar
 
Join Date: Jan 2011
Location: echo $HOME; California
Posts: 2,780
 
Device(s): Kindle Fire HD 8.9" (rooted), Motorola Atrix 2, Motorola Atrix 4G (retired), Motorola Bravo (retired
Carrier: AT&T

Thanks: 926
Thanked 1,363 Times in 822 Posts
Default

Quote:
Originally Posted by palmtree5 View Post
Something I just found out the hard way is this doesn't deal with directories that contain spaces in their names...
Tsk...tsk...tsk... Spaces in file names. *sigh*



Experiment with quoting/escaping the commands that refer to directories. If you run up against a brick wall, shout!
9to5cynic likes this.
MoodyBlues is offline  
Reply With Quote
Old September 16th, 2013, 05:42 PM   #925 (permalink)
Senior Member
 
palmtree5's Avatar
 
Join Date: May 2012
Location: USA
Gender: Male
Posts: 2,744
 
Device(s): HTC One SV, Samsung Galaxy Prevail (retired), Nexus 7 (Gen 1)
Carrier: Boost Mobile

Thanks: 1,655
Thanked 1,462 Times in 754 Posts
Default

Quote:
Originally Posted by MoodyBlues View Post
Tsk...tsk...tsk... Spaces in file names. *sigh*



Experiment with quoting/escaping the commands that refer to directories. If you run up against a brick wall, shout!
That's what I was thinking but I can't seem to get it
palmtree5 is online now  
Reply With Quote
Old September 16th, 2013, 08:35 PM   #926 (permalink)
The PearlyMon
 
EarlyMon's Avatar
 
Join Date: Jun 2010
Location: New Mexico, USA
Posts: 44,032
 
Device(s): LTEvo, 3vo, and Shift
Carrier: Sprint

Thanks: 41,694
Thanked 54,829 Times in 21,865 Posts
Default

Hint -

Code:
# Change input field separator from default space, restore when done

SAVEIFS=$IFS
IFS=$(echo -en "\n\b")

for SUBDIR in `ls -d1 */`
do
  echo "Testing: $SUBDIR"
done

# cleanup

IFS=$SAVEIFS
Kinda in a hurry, saw this on a drive-by, sorry it's not complete.

Probably use sed to fix whatever else within the for loop.
MoodyBlues and 9to5cynic like this.
EarlyMon is online now  
Reply With Quote
The Following User Says Thank You to EarlyMon For This Useful Post:
MoodyBlues (September 17th, 2013)
Old September 17th, 2013, 07:44 AM   #927 (permalink)
I ain't nobody!
 
saptech's Avatar
 
Join Date: Dec 2011
Location: Third Stone from the Sun
Posts: 3,544
 
Device(s): Motorola Moto G, Samsung Stratosphere, Galaxy Tab 2 SE.
Carrier: T-Mobile

Thanks: 572
Thanked 768 Times in 612 Posts
Default

Wow, Debian has overtook Ubuntu on Distrowatch rankings. Mga is 4th, hopefully within the next few months, Mga will overtake Ubuntu!

DistroWatch.com: Put the fun back into computing. Use Linux, BSD.
Dngrsone likes this.
saptech is offline  
Reply With Quote
The Following User Says Thank You to saptech For This Useful Post:
9to5cynic (September 18th, 2013)
Old September 17th, 2013, 09:33 AM   #928 (permalink)
Senior Member
 
Dngrsone's Avatar
 
Join Date: Jan 2013
Location: Centrally located far from everywhere
Gender: Male
Posts: 1,206
 
Device(s): Samsung Galaxy S II 'Epic 4G Touch' SPH-D710, Samsung Galaxy Tab 2 7.0
Carrier: Sprint

Thanks: 131
Thanked 258 Times in 209 Posts
Default

I didn't know Mint was at the top.

Now I wonder if I should be proud that my OS of choice is the most popular or if maybe I should be bucking the trend and using something that isn't quite so mainstream.

I could go back to Slackware, try Arch, or something.

I see DSL is finally looking at an update after four years of no movement...

I always did like the early fluxbox interface of DSL.
saptech likes this.
Dngrsone is online now  
Reply With Quote
Old September 17th, 2013, 11:57 AM   #929 (permalink)
I ain't nobody!
 
saptech's Avatar
 
Join Date: Dec 2011
Location: Third Stone from the Sun
Posts: 3,544
 
Device(s): Motorola Moto G, Samsung Stratosphere, Galaxy Tab 2 SE.
Carrier: T-Mobile

Thanks: 572
Thanked 768 Times in 612 Posts
Default

Yes, Mint has been on top for a good while. It's based on Ubuntu which is based on Debian, so the top three are Debian based. If you want to try something different, give Debian a try. I've always used it instead of its siblings. Slackware & Arch are good choices also, along with Mageia (mga)!
saptech is offline  
Reply With Quote
The Following User Says Thank You to saptech For This Useful Post:
Dngrsone (September 17th, 2013)
Old September 17th, 2013, 01:05 PM   #930 (permalink)
Senior Member
 
Dngrsone's Avatar
 
Join Date: Jan 2013
Location: Centrally located far from everywhere
Gender: Male
Posts: 1,206
 
Device(s): Samsung Galaxy S II 'Epic 4G Touch' SPH-D710, Samsung Galaxy Tab 2 7.0
Carrier: Sprint

Thanks: 131
Thanked 258 Times in 209 Posts
Default

What's the default desktop environment for Debian?
Dngrsone is online now  
Reply With Quote
sponsored links
Old September 17th, 2013, 01:29 PM   #931 (permalink)
- Crazy peacock person -
Thread Author (OP)
 
MoodyBlues's Avatar
 
Join Date: Jan 2011
Location: echo $HOME; California
Posts: 2,780
 
Device(s): Kindle Fire HD 8.9" (rooted), Motorola Atrix 2, Motorola Atrix 4G (retired), Motorola Bravo (retired
Carrier: AT&T

Thanks: 926
Thanked 1,363 Times in 822 Posts
Default

Quote:
Originally Posted by saptech View Post
Wow, Debian has overtook Ubuntu on Distrowatch rankings.
Wow. I did not know this.
MoodyBlues is offline  
Reply With Quote
Old September 17th, 2013, 01:52 PM   #932 (permalink)
- Crazy peacock person -
Thread Author (OP)
 
MoodyBlues's Avatar
 
Join Date: Jan 2011
Location: echo $HOME; California
Posts: 2,780
 
Device(s): Kindle Fire HD 8.9" (rooted), Motorola Atrix 2, Motorola Atrix 4G (retired), Motorola Bravo (retired
Carrier: AT&T

Thanks: 926
Thanked 1,363 Times in 822 Posts
Default

Quote:
Originally Posted by palmtree5 View Post
That's what I was thinking but I can't seem to get it
Using EM's snippet, I've got it working, but I wonder if you'd like to take a stab at it before I post. Let me know.
MoodyBlues is offline  
Reply With Quote
Old September 17th, 2013, 03:25 PM   #933 (permalink)
Member
 
Joelgp83's Avatar
 
Join Date: Jul 2012
Location: California
Posts: 371
 
Device(s): Samsung Galaxy Prevail (CM7 beta5)
Carrier: Not Provided

Thanks: 48
Thanked 124 Times in 103 Posts
Default

Quote:
Originally Posted by Dngrsone View Post
What's the default desktop environment for Debian?
I'd suspect it was something gnome 2 or 3 based....
Joelgp83 is offline  
Reply With Quote
Old September 17th, 2013, 03:36 PM   #934 (permalink)
Senior Member
 
palmtree5's Avatar
 
Join Date: May 2012
Location: USA
Gender: Male
Posts: 2,744
 
Device(s): HTC One SV, Samsung Galaxy Prevail (retired), Nexus 7 (Gen 1)
Carrier: Boost Mobile

Thanks: 1,655
Thanked 1,462 Times in 754 Posts
Default

Quote:
Originally Posted by MoodyBlues View Post
Using EM's snippet, I've got it working, but I wonder if you'd like to take a stab at it before I post. Let me know.
Not really unless I push it to the upcoming weekend as I have more important things to do between now and Friday
palmtree5 is online now  
Reply With Quote
Old September 17th, 2013, 04:02 PM   #935 (permalink)
- Crazy peacock person -
Thread Author (OP)
 
MoodyBlues's Avatar
 
Join Date: Jan 2011
Location: echo $HOME; California
Posts: 2,780
 
Device(s): Kindle Fire HD 8.9" (rooted), Motorola Atrix 2, Motorola Atrix 4G (retired), Motorola Bravo (retired
Carrier: AT&T

Thanks: 926
Thanked 1,363 Times in 822 Posts
Default

Quote:
Originally Posted by palmtree5 View Post
Not really unless I push it to the upcoming weekend as I have more important things to do between now and Friday
Okay, here's my script:

[high]
#!/bin/bash
SUBDIR=$1
SAVEIFS=$IFS

IFS=$(echo -en "\n\b")
cd $SUBDIR

for SUBDIR2 in `ls -d1 */`
do ZIPFILE=$(basename "$SUBDIR2")
zip -r $ZIPFILE/$ZIPFILE.zip $SUBDIR2
done

# cleanup
IFS=$SAVEIFS
[/high]

As always, this can be tweaked as needed/desired. Right now, it's taking you to the directory whose name you enter at runtime, then it's doing its thing as far as locating subdirectories and zipping their contents. It's creating the zipped files in each subdirectory; of course that can be changed to wherever you'd prefer.

And thanks to EM for the $IFS idea.
MoodyBlues is offline  
Reply With Quote
The Following User Says Thank You to MoodyBlues For This Useful Post:
EarlyMon (September 17th, 2013)
Old September 17th, 2013, 07:53 PM   #936 (permalink)
The PearlyMon
 
EarlyMon's Avatar
 
Join Date: Jun 2010
Location: New Mexico, USA
Posts: 44,032
 
Device(s): LTEvo, 3vo, and Shift
Carrier: Sprint

Thanks: 41,694
Thanked 54,829 Times in 21,865 Posts
Default

Don't have to pump those through sed to escape any blanks in the path name?
EarlyMon is online now  
Reply With Quote
Old September 17th, 2013, 08:21 PM   #937 (permalink)
Senior Member
 
palmtree5's Avatar
 
Join Date: May 2012
Location: USA
Gender: Male
Posts: 2,744
 
Device(s): HTC One SV, Samsung Galaxy Prevail (retired), Nexus 7 (Gen 1)
Carrier: Boost Mobile

Thanks: 1,655
Thanked 1,462 Times in 754 Posts
Default

Quote:
Originally Posted by MoodyBlues View Post
Okay, here's my script:

[high]
#!/bin/bash
SUBDIR=$1
SAVEIFS=$IFS

IFS=$(echo -en "\n\b")
cd $SUBDIR

for SUBDIR2 in `ls -d1 */`
do ZIPFILE=$(basename "$SUBDIR2")
zip -r $ZIPFILE/$ZIPFILE.zip $SUBDIR2
done

# cleanup
IFS=$SAVEIFS
[/high]

As always, this can be tweaked as needed/desired. Right now, it's taking you to the directory whose name you enter at runtime, then it's doing its thing as far as locating subdirectories and zipping their contents. It's creating the zipped files in each subdirectory; of course that can be changed to wherever you'd prefer.

And thanks to EM for the $IFS idea.
Quote:
Originally Posted by EarlyMon View Post
Don't have to pump those through sed to escape any blanks in the path name?
Apparently not. What Moody posted works
EarlyMon and MoodyBlues like this.
palmtree5 is online now  
Reply With Quote
Old September 17th, 2013, 09:48 PM   #938 (permalink)
- Crazy peacock person -
Thread Author (OP)
 
MoodyBlues's Avatar
 
Join Date: Jan 2011
Location: echo $HOME; California
Posts: 2,780
 
Device(s): Kindle Fire HD 8.9" (rooted), Motorola Atrix 2, Motorola Atrix 4G (retired), Motorola Bravo (retired
Carrier: AT&T

Thanks: 926
Thanked 1,363 Times in 822 Posts
Default

Quote:
Originally Posted by EarlyMon View Post
Don't have to pump those through sed to escape any blanks in the path name?
No, the basename line is taking care of that.
MoodyBlues is offline  
Reply With Quote
Old September 17th, 2013, 11:40 PM   #939 (permalink)
I ain't nobody!
 
saptech's Avatar
 
Join Date: Dec 2011
Location: Third Stone from the Sun
Posts: 3,544
 
Device(s): Motorola Moto G, Samsung Stratosphere, Galaxy Tab 2 SE.
Carrier: T-Mobile

Thanks: 572
Thanked 768 Times in 612 Posts
Default

Quote:
Originally Posted by Dngrsone View Post
What's the default desktop environment for Debian?
It used to be Gnome 2, but assume it may be Gnome 3. I haven't installed a default Debian in very long time.

I'm not running it at the moment but when I did, I would do a minimum install of the basic system and then add other components as I needed them. Such as a WM instead of DE.
saptech is offline  
Reply With Quote
The Following User Says Thank You to saptech For This Useful Post:
Dngrsone (September 17th, 2013)
Old September 18th, 2013, 12:13 AM   #940 (permalink)
- Crazy peacock person -
Thread Author (OP)
 
MoodyBlues's Avatar
 
Join Date: Jan 2011
Location: echo $HOME; California
Posts: 2,780
 
Device(s): Kindle Fire HD 8.9" (rooted), Motorola Atrix 2, Motorola Atrix 4G (retired), Motorola Bravo (retired
Carrier: AT&T

Thanks: 926
Thanked 1,363 Times in 822 Posts
Default

Quote:
Originally Posted by saptech View Post
Quote:
Originally Posted by Dngrsone View Post
What's the default desktop environment for Debian?
It used to be Gnome 2, but assume it may be Gnome 3.
What about Unity? Or is that strictly a *buntu thing? (I stick to my trusty and beloved KDE, so I'm quite out of the loop on those other DEs. )
saptech likes this.
MoodyBlues is offline  
Reply With Quote
sponsored links
Old September 18th, 2013, 12:27 AM   #941 (permalink)
Senior Member
 
palmtree5's Avatar
 
Join Date: May 2012
Location: USA
Gender: Male
Posts: 2,744
 
Device(s): HTC One SV, Samsung Galaxy Prevail (retired), Nexus 7 (Gen 1)
Carrier: Boost Mobile

Thanks: 1,655
Thanked 1,462 Times in 754 Posts
Default

Quote:
Originally Posted by MoodyBlues View Post
What about Unity? Or is that strictly a *buntu thing? (I stick to my trusty and beloved KDE, so I'm quite out of the loop on those other DEs. )
Unity is the default on Ubuntu (I wouldn't say strictly though as it can be installed on non-*buntu distros)
MoodyBlues and saptech like this.
palmtree5 is online now  
Reply With Quote
Old September 18th, 2013, 12:39 AM   #942 (permalink)
Senior Member
 
Dngrsone's Avatar
 
Join Date: Jan 2013
Location: Centrally located far from everywhere
Gender: Male
Posts: 1,206
 
Device(s): Samsung Galaxy S II 'Epic 4G Touch' SPH-D710, Samsung Galaxy Tab 2 7.0
Carrier: Sprint

Thanks: 131
Thanked 258 Times in 209 Posts
Default

Unity is not exclusive to Ubuntu... one should be able to install it on Debian.
MoodyBlues and palmtree5 like this.
Dngrsone is online now  
Reply With Quote
The Following User Says Thank You to Dngrsone For This Useful Post:
palmtree5 (September 18th, 2013)
Old September 18th, 2013, 12:45 AM   #943 (permalink)
- Crazy peacock person -
Thread Author (OP)
 
MoodyBlues's Avatar
 
Join Date: Jan 2011
Location: echo $HOME; California
Posts: 2,780
 
Device(s): Kindle Fire HD 8.9" (rooted), Motorola Atrix 2, Motorola Atrix 4G (retired), Motorola Bravo (retired
Carrier: AT&T

Thanks: 926
Thanked 1,363 Times in 822 Posts
Default

Quote:
Originally Posted by palmtree5 View Post
Unity is the default on Ubuntu (I wouldn't say strictly though as it can be installed on non-*buntu distros)
Quote:
Originally Posted by Dngrsone View Post
Unity is not exclusive to Ubuntu... one should be able to install it on Debian.
Thanks for the info. Now I guess the question is, WHY would anyone want to install it?! (Yes, I'm a KDE person through and through--but I did try Unity (just for the hell of it) a few times, so at least I'm not insulting something I've never tried!)
MoodyBlues is offline  
Reply With Quote
Old September 18th, 2013, 06:59 AM   #944 (permalink)
The PearlyMon
 
EarlyMon's Avatar
 
Join Date: Jun 2010
Location: New Mexico, USA
Posts: 44,032
 
Device(s): LTEvo, 3vo, and Shift
Carrier: Sprint

Thanks: 41,694
Thanked 54,829 Times in 21,865 Posts
Default

Quote:
Originally Posted by MoodyBlues View Post
No, the basename line is taking care of that.
The last SUBDIR2 in the zip command isn't affected by the basename.

Interesting. I'm guessing that the IFS sorted that as well...
EarlyMon is online now  
Reply With Quote
The Following User Says Thank You to EarlyMon For This Useful Post:
MoodyBlues (September 18th, 2013)
Old September 18th, 2013, 08:32 AM   #945 (permalink)
Member
 
Join Date: May 2013
Location: UK
Posts: 209
 
Device(s): Samsung Galaxy Ace 2 sim free, Acer Iconia A200
Carrier: Not Provided

Thanks: 13
Thanked 50 Times in 45 Posts
Default

I don't get on well with bash (I dislike the syntax and there seems to me to be a number of "gotchas"). I guess if I had ambitions of being a system admin I'd have to change my ways but for me at home, I'd probably do something like.

PHP Code:
<?php
if (count ($argv) !=2){
  echo 
"Usage zip.php directory\n";
  exit;
}

if (!@
chdir($argv[1])){
  echo 
"Invalid directory\n";
  exit;
}

$logfile "zip.log";
@
unlink($logfile);
foreach (
glob("*"GLOB_ONLYDIR GLOB_MARK) as $dir){
  
$name basename($dir);
  
exec("zip -r \"$dir$name.zip\" \"$dir\" &>>$logfile");
}
?>
jonbanjo is offline  
Reply With Quote
The Following User Says Thank You to jonbanjo For This Useful Post:
EarlyMon (September 18th, 2013)
Old September 18th, 2013, 08:51 AM   #946 (permalink)
Senior Member
 
palmtree5's Avatar
 
Join Date: May 2012
Location: USA
Gender: Male
Posts: 2,744
 
Device(s): HTC One SV, Samsung Galaxy Prevail (retired), Nexus 7 (Gen 1)
Carrier: Boost Mobile

Thanks: 1,655
Thanked 1,462 Times in 754 Posts
Default

Quote:
Originally Posted by jonbanjo View Post
I don't get on well with bash (I dislike the syntax and there seems to me to be a number of "gotchas"). I guess if I had ambitions of being a system admin I'd have to change my ways but for me at home, I'd probably do something like.

PHP Code:
<?php
if (count ($argv) !=2){
  echo 
"Usage zip.php directory\n";
  exit;
}

if (!@
chdir($argv[1])){
  echo 
"Invalid directory\n";
  exit;
}

$logfile "zip.log";
@
unlink($logfile);
foreach (
glob("*"GLOB_ONLYDIR GLOB_MARK) as $dir){
  
$name basename($dir);
  
exec("zip -r \"$dir$name.zip\" \"$dir\" &>>$logfile");
}
?>
There are other shells...
palmtree5 is online now  
Reply With Quote
Old September 18th, 2013, 09:13 AM   #947 (permalink)
Member
 
Join Date: May 2013
Location: UK
Posts: 209
 
Device(s): Samsung Galaxy Ace 2 sim free, Acer Iconia A200
Carrier: Not Provided

Thanks: 13
Thanked 50 Times in 45 Posts
Default

Quote:
Originally Posted by palmtree5 View Post
There are other shells...
csh looks nicer to me but (at least for my own use). I don't see the point of using a shell for the sake of maybe doing the right thing.
jonbanjo is offline  
Reply With Quote
Old September 18th, 2013, 09:40 AM   #948 (permalink)
The PearlyMon
 
EarlyMon's Avatar
 
Join Date: Jun 2010
Location: New Mexico, USA
Posts: 44,032
 
Device(s): LTEvo, 3vo, and Shift
Carrier: Sprint

Thanks: 41,694
Thanked 54,829 Times in 21,865 Posts
Default

Shell + sed + awk and you can do nearly anything.

Lot of scripting languages came later to help those finding that path too difficult.

I once took weeks and found a way to pass variables by reference in csh, something that is known undoable, just because.

And bash is a hippie's approach to ksh.
MoodyBlues and jonbanjo like this.
EarlyMon is online now  
Reply With Quote
Old September 18th, 2013, 02:03 PM   #949 (permalink)
- Crazy peacock person -
Thread Author (OP)
 
MoodyBlues's Avatar
 
Join Date: Jan 2011
Location: echo $HOME; California
Posts: 2,780
 
Device(s): Kindle Fire HD 8.9" (rooted), Motorola Atrix 2, Motorola Atrix 4G (retired), Motorola Bravo (retired
Carrier: AT&T

Thanks: 926
Thanked 1,363 Times in 822 Posts
Default

Quote:
Originally Posted by EarlyMon View Post
The last SUBDIR2 in the zip command isn't affected by the basename.
You're right. My quick glance at that line shouldn't have been so quick.

Quote:
Interesting. I'm guessing that the IFS sorted that as well...
Yes, that's it.
MoodyBlues is offline  
Reply With Quote
Old September 18th, 2013, 02:07 PM   #950 (permalink)
- Crazy peacock person -
Thread Author (OP)
 
MoodyBlues's Avatar
 
Join Date: Jan 2011
Location: echo $HOME; California
Posts: 2,780
 
Device(s): Kindle Fire HD 8.9" (rooted), Motorola Atrix 2, Motorola Atrix 4G (retired), Motorola Bravo (retired
Carrier: AT&T

Thanks: 926
Thanked 1,363 Times in 822 Posts
Default

Quote:
Originally Posted by EarlyMon View Post
Shell + sed + awk and you can do nearly anything.
I'd throw grep in there, too.
MoodyBlues is offline  
Reply With Quote
The Following User Says Thank You to MoodyBlues For This Useful Post:
EarlyMon (September 19th, 2013)
Reply
Tags
bash, bash script, bash shell, linux, linux questions, linux scripting


Go Back   Android Forums > Android Community > The Lounge > Computers & IT
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 12:17 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.