LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   cp not working (https://www.linuxquestions.org/questions/linux-newbie-8/cp-not-working-4175497057/)

Fixit7 03-04-2014 09:23 PM

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

rknichols 03-04-2014 10:32 PM

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".

Fixit7 03-04-2014 10:40 PM

Thanks.

Andy

grail 03-04-2014 11:40 PM

Please mark as SOLVED once you have a working solution.

Fixit7 03-08-2014 02:07 AM

What is the rep that I see for posters ?

Andy

colucix 03-08-2014 06:34 AM

http://www.linuxquestions.org/questi...vb3_reputation

John VV 03-08-2014 02:44 PM

png images are already ziped

they use libz to compress

it would be better to just tar up the folder

Fixit7 03-08-2014 10:49 PM

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

John VV 03-09-2014 12:28 AM

if you try to zip a png it likely will be about 0.5% to 1% bigger

Emerson 03-09-2014 01:03 AM

Use ls -l to see size.

Fixit7 03-09-2014 05:43 PM

Quote:

Originally Posted by Emerson (Post 5131380)
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

John VV 03-09-2014 06:54 PM

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


Fixit7 03-09-2014 07:59 PM

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

astrogeek 03-09-2014 08:05 PM

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

Fixit7 03-23-2014 08:40 PM

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


All times are GMT -5. The time now is 03:46 AM.