LinuxQuestions.org
Help answer threads with 0 replies.
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, 10:23 PM   #1
Fixit7
Senior Member
 
Registered: Mar 2014
Distribution: Ubuntu_Mate
Posts: 1,221

Rep: Reputation: 160Reputation: 160
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 02:27 AM. Reason: Solved
 
Old 03-04-2014, 11:32 PM   #2
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 2,967

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
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, 11:40 PM   #3
Fixit7
Senior Member
 
Registered: Mar 2014
Distribution: Ubuntu_Mate
Posts: 1,221

Original Poster
Rep: Reputation: 160Reputation: 160
Thanks.

Andy
 
Old 03-05-2014, 12:40 AM   #4
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,256

Rep: Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686
Please mark as SOLVED once you have a working solution.
 
1 members found this post helpful.
Old 03-08-2014, 03:07 AM   #5
Fixit7
Senior Member
 
Registered: Mar 2014
Distribution: Ubuntu_Mate
Posts: 1,221

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

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

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

Rep: Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409
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, 11:49 PM   #8
Fixit7
Senior Member
 
Registered: Mar 2014
Distribution: Ubuntu_Mate
Posts: 1,221

Original Poster
Rep: Reputation: 160Reputation: 160
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, 01:28 AM   #9
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,829

Rep: Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409
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, 03:03 AM   #10
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 5,872

Rep: Reputation: Disabled
Use ls -l to see size.
 
1 members found this post helpful.
Old 03-09-2014, 06:43 PM   #11
Fixit7
Senior Member
 
Registered: Mar 2014
Distribution: Ubuntu_Mate
Posts: 1,221

Original Poster
Rep: Reputation: 160Reputation: 160
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, 07:54 PM   #12
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,829

Rep: Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409
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, 08:59 PM   #13
Fixit7
Senior Member
 
Registered: Mar 2014
Distribution: Ubuntu_Mate
Posts: 1,221

Original Poster
Rep: Reputation: 160Reputation: 160
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, 09:05 PM   #14
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=14, FreeBSD_10{.0|.1|.2}
Posts: 3,887
Blog Entries: 1

Rep: Reputation: 2007Reputation: 2007Reputation: 2007Reputation: 2007Reputation: 2007Reputation: 2007Reputation: 2007Reputation: 2007Reputation: 2007Reputation: 2007Reputation: 2007
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 09:12 PM.
 
1 members found this post helpful.
Old 03-23-2014, 09:40 PM   #15
Fixit7
Senior Member
 
Registered: Mar 2014
Distribution: Ubuntu_Mate
Posts: 1,221

Original Poster
Rep: Reputation: 160Reputation: 160
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 04:59 PM
media problem with .avi --- audio only in vlc working rest amarock ,etc. not working fedex Linux - Newbie 1 12-22-2007 09:06 AM
SED - minor changes work - Larger doesn't (working and non working code included) Nimoy Programming 17 09-22-2007 05:34 PM
Fortemedia FM801 card not working under FC5 on Intel 845 but working with windows morningkiran Linux - Hardware 0 11-30-2006 08: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 02:41 AM


All times are GMT -5. The time now is 04:52 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration