LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-04-2014, 09:23 PM   #1
Fixit7
Senior Member
 
Registered: Mar 2014
Location: El Lago, Texas
Distribution: Ubuntu_Mate 16.04
Posts: 1,374

Rep: Reputation: 169Reputation: 169
cp not working


This works fine up to the cp lines.

I can not understand why is says no file/directory when there are both ?

Thanks.

I have even read bash tutorials and made a number of posts.

# zipIcons.sh Slacko Puppy - 5.6.0
# Compress icons and send
# copy to storage drive /mnt/sdb1
cd /
cd root
cd Icons
zip Linux_Icons *.png
cp Linux_Icons /mnt/sdb1/STORAGE
cp Linux_Icons Storage

Last edited by Fixit7; 03-05-2014 at 01:27 AM. Reason: Solved
 
Old 03-04-2014, 10:32 PM   #2
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,779

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
Quote from the zip manpage:
"If the name of the zip archive does not contain an extension, the extension .zip is added. If the name already contains an extension other than .zip the existing extension is kept unchanged."
In your case, the name of your ZIPfile will be "Linux_Icons.zip".
 
1 members found this post helpful.
Old 03-04-2014, 10:40 PM   #3
Fixit7
Senior Member
 
Registered: Mar 2014
Location: El Lago, Texas
Distribution: Ubuntu_Mate 16.04
Posts: 1,374

Original Poster
Rep: Reputation: 169Reputation: 169
Thanks.

Andy
 
Old 03-04-2014, 11:40 PM   #4
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 10,007

Rep: Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191
Please mark as SOLVED once you have a working solution.
 
1 members found this post helpful.
Old 03-08-2014, 02:07 AM   #5
Fixit7
Senior Member
 
Registered: Mar 2014
Location: El Lago, Texas
Distribution: Ubuntu_Mate 16.04
Posts: 1,374

Original Poster
Rep: Reputation: 169Reputation: 169
What is the rep that I see for posters ?

Andy
 
Old 03-08-2014, 06:34 AM   #6
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
http://www.linuxquestions.org/questi...vb3_reputation
 
1 members found this post helpful.
Old 03-08-2014, 02:44 PM   #7
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
png images are already ziped

they use libz to compress

it would be better to just tar up the folder
 
2 members found this post helpful.
Old 03-08-2014, 10:49 PM   #8
Fixit7
Senior Member
 
Registered: Mar 2014
Location: El Lago, Texas
Distribution: Ubuntu_Mate 16.04
Posts: 1,374

Original Poster
Rep: Reputation: 169Reputation: 169
I would like to see if a zip file takes up any less space than just the .png files.

Is there a way to modify this so it shows the total amount of bytes ?

Code:
du -sh -b *.png
Andy
 
Old 03-09-2014, 12:28 AM   #9
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
if you try to zip a png it likely will be about 0.5% to 1% bigger
 
1 members found this post helpful.
Old 03-09-2014, 01:03 AM   #10
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
Use ls -l to see size.
 
1 members found this post helpful.
Old 03-09-2014, 05:43 PM   #11
Fixit7
Senior Member
 
Registered: Mar 2014
Location: El Lago, Texas
Distribution: Ubuntu_Mate 16.04
Posts: 1,374

Original Poster
Rep: Reputation: 169Reputation: 169
Quote:
Originally Posted by Emerson View Post
Use ls -l to see size.
I meant the total number of bytes of ALL files added up together.

Like Windows dir *.png would give.

Andy
 
Old 03-09-2014, 06:54 PM   #12
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
just zip a single png image and compare it

Code:
ls -l 
-rw-r--r-- 1 ?????? ????? 751779 Feb 19 00:41 1.test.png
-rw-r--r-- 1 ?????? ????? 752064 Mar  9 19:50 1.test.png.zip
 
1 members found this post helpful.
Old 03-09-2014, 07:59 PM   #13
Fixit7
Senior Member
 
Registered: Mar 2014
Location: El Lago, Texas
Distribution: Ubuntu_Mate 16.04
Posts: 1,374

Original Poster
Rep: Reputation: 169Reputation: 169
I know I can do that.

Does that mean that Linux has no way of giving a total number of bytes for a set of files ?

This is something that I would use often.

Andy
 
Old 03-09-2014, 08:05 PM   #14
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,263
Blog Entries: 24

Rep: Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194
Try du -c *.png to get the total (add -h, -b, etc for the number format you want).

Last edited by astrogeek; 03-09-2014 at 08:12 PM.
 
1 members found this post helpful.
Old 03-23-2014, 08:40 PM   #15
Fixit7
Senior Member
 
Registered: Mar 2014
Location: El Lago, Texas
Distribution: Ubuntu_Mate 16.04
Posts: 1,374

Original Poster
Rep: Reputation: 169Reputation: 169
Thanks.

Using in /bin

du -a -c -h -b *.* > dir.txt

I got this, but it should be a much larger list.

318428 gawk-3.1.8
5716 ntfs-3g.probe
52816 ntfs-3g.secaudit
12160 ntfs-3g.usermap
122396 tar-1.13
3 tar-1.26
511519 total
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Wifi not working in Eee PPC 1000HE (Debian Squeeze), but ethernet is working someshpr Linux - Laptop and Netbook 8 10-10-2011 03:59 PM
media problem with .avi --- audio only in vlc working rest amarock ,etc. not working fedex Linux - Newbie 1 12-22-2007 08:06 AM
SED - minor changes work - Larger doesn't (working and non working code included) Nimoy Programming 17 09-22-2007 04:34 PM
Fortemedia FM801 card not working under FC5 on Intel 845 but working with windows morningkiran Linux - Hardware 0 11-30-2006 07:57 AM
acpi nearly working IBM thinkpad R40e 2684HVG no Fn key working, throttling OK Emmanuel_uk Linux - Laptop and Netbook 2 05-31-2006 01:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:40 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration