cp command help
ok I'm trying to install ipblock and the directions state...
To build Fedora Core or OpenSuSE packages copy the source tarball to /usr/src/*/SOURCES and use the iplist.spec file which is in the source tree. # cp iplist-<version>.tar.gz /usr/src/*/SOURCES # rpmbuild -ba iplist.spec The build rpm and source rpm are located in /usr/src/*/RPMS/<arch> and /usr/src/*/SRPMS/, respectively. and I think I'm having so much trouble is because I dont really have any knowledge of how the cp command works like for intense are the <> necessary and what does the star character do/mean? if someone could give a rundown of how it works using this as an example I would greatly appreciate it thanks |
Man page. To answer your question:
The <version> means 'put your version number in here' The * is a wildcard Don't forget, don't put those # signs in, they mean you ought to run them as root |
I am already running as root under the su command but anyway when I put in
cp iplist-0.26.tar.gz /usr/src/*/SOURCES all's I get is cp: cannot stat `iplist-0.26.tar.gz': No such file or directory so what am I doing wrong? |
Does that file exist?
|
yes it does it's on the desktop I've even ran cd /home/vmplanet/desktop as I thought that this might be the problem but no I still get the same message
|
Try cp /home/vmplanet/desktop/iplist-0.26.tar.gz /usr/src/*/SOURCES, but it may be the destination that doesn't exist. What does "ls -l /usr/src" give you
|
ran it and it gave me the same thing well here's the info you requested
7z465 .fonts .metacity wp-cron.php .adobe .fonts.conf moblock wp-feed.php .bash_history .gconf .mozilla wp-links-opml.php .bashrc .gconfd .ooo-2.0 wp-load.php .beagle .gimp-2.4 .opera wp-login.php bin .gnome2 patch-2.6.29.4 wp-mail.php .cache .gnome2_private photo_1226012077.jpg wp-pass.php .config .gnupg .profile wp-rdf.php config.log .gstreamer-0.10 public_html wp-register.php .cxchromium .ICEauthority qsynaptics wp-rss2.php .dbus index.php .qt wp-rss.php .DCOPserver_linux-2phg__0 info readme.html wp-settings.php .DCOPserver_linux-2phg_:0 .inputrc .recently-used wp-trackback.php .DCOPserver_opensuse-vm__0 ipblock .recently-used.xbel .Xauthority .DCOPserver_opensuse-vm_:0 .kde .skel .xcompmgrrc desktop .kde4 .thumbnails .xim.template Desktop .kderc .wapi .xine .dmrc ksynaptics-0.3.3 wp-app.php .xinitrc.template Documents libflashplayer.so wp-atom.php xmlrpc.php .emacs license.txt wp-blog-header.php .xsession-errors Firefox_wallpaper.png .local wp-comments-post.php .y2log flashplayer-installer .macromedia wp-commentsrss2.php .y2usersettings .fontconfig .mcop wp-config-sample.php |
The error is for the file specified. Do me a favour and paste in the command exactly, and do me a:
Code:
ls -al EDIT: By which I mean, paste in exactly which cp command you're using, and the result of the above |
What was that a response to?
|
and what do you mean which cp command? I just type cp iplist-0.26.tar.gz /usr/src/*/SOURCES
total 11572 drwxr-xr-x 42 vmplanet users 4096 2009-06-02 22:26 . drwxr-xr-x 4 root root 4096 2008-06-19 15:23 .. drwxr-xr-x 7 vmplanet users 4096 2009-06-01 04:38 7z465 drwx------ 3 vmplanet users 4096 2009-05-21 18:19 .adobe -rw------- 1 vmplanet users 482 2009-06-02 21:58 .bash_history -rw-r--r-- 1 vmplanet users 1177 2008-06-19 15:23 .bashrc drwx------ 7 vmplanet users 4096 2009-06-02 17:20 .beagle drwxr-xr-x 2 vmplanet users 4096 2008-06-19 15:23 bin drwx------ 2 vmplanet users 4096 2009-05-28 03:34 .cache drwxr-xr-x 8 vmplanet users 4096 2009-05-28 03:35 .config -rw-r--r-- 1 vmplanet users 12890 2009-05-26 13:47 config.log drwxr-xr-x 3 vmplanet users 4096 2009-05-27 18:44 .cxchromium drwx------ 3 vmplanet users 4096 2008-06-19 15:24 .dbus -rw-r--r-- 1 vmplanet users 57 2008-06-19 15:24 .DCOPserver_linux-2phg__0 lrwxrwxrwx 1 vmplanet users 40 2008-06-19 15:24 .DCOPserver_linux-2phg_:0 -> /home/vmplanet/.DCOPserver_linux-2phg__0 -rw-r--r-- 1 vmplanet users 58 2009-06-02 02:48 .DCOPserver_opensuse-vm__0 lrwxrwxrwx 1 vmplanet users 41 2009-06-02 02:48 .DCOPserver_opensuse-vm_:0 -> /home/vmplanet/.DCOPserver_opensuse-vm__0 drwxr-xr-x 5 vmplanet users 4096 2009-05-21 18:25 desktop drwxr-xr-x 2 vmplanet users 4096 2009-06-02 16:02 Desktop -rw------- 1 vmplanet users 26 2008-06-19 15:24 .dmrc drwxr-xr-x 5 vmplanet users 4096 2009-05-27 17:46 Documents -rw-r--r-- 1 vmplanet users 1637 2008-06-19 15:23 .emacs -rw-r--r-- 1 vmplanet users 270847 2009-05-27 20:11 Firefox_wallpaper.png -rwxr-xr-x 1 vmplanet users 21701 2009-06-02 21:38 flashplayer-installer drwxr-xr-x 2 vmplanet users 4096 2009-05-30 17:46 .fontconfig drwxr-xr-x 2 vmplanet users 4096 2008-06-19 15:24 .fonts -rw-r--r-- 1 vmplanet users 514 2009-05-21 23:04 .fonts.conf drwx------ 3 vmplanet users 4096 2009-06-02 02:49 .gconf drwx------ 2 vmplanet users 4096 2009-06-02 02:50 .gconfd drwxr-xr-x 22 vmplanet users 4096 2009-05-27 22:59 .gimp-2.4 drwx------ 4 vmplanet users 4096 2009-05-31 23:39 .gnome2 drwx------ 2 vmplanet users 4096 2009-05-21 18:19 .gnome2_private drwx------ 3 vmplanet users 4096 2009-05-20 00:59 .gnupg drwxr-xr-x 2 vmplanet users 4096 2009-05-28 03:28 .gstreamer-0.10 -rw------- 1 vmplanet users 396 2009-06-02 02:48 .ICEauthority -rw-r--r-- 1 root root 397 2009-06-02 21:38 index.php drwxr-xr-x 2 vmplanet users 4096 2009-05-19 10:05 info -rw-r--r-- 1 vmplanet users 861 2008-06-19 15:23 .inputrc drwxr-xr-x 5 vmplanet users 4096 2009-06-02 21:14 ipblock drwx------ 4 vmplanet users 4096 2009-05-21 23:04 .kde drwx------ 4 vmplanet users 4096 2008-06-19 15:31 .kde4 -rw------- 1 vmplanet users 301 2009-05-27 04:34 .kderc drwxr-xr-x 5 vmplanet users 4096 2009-05-26 13:50 ksynaptics-0.3.3 -rw-r--r-- 1 vmplanet users 10131640 2009-06-02 21:39 libflashplayer.so -rw-r--r-- 1 vmplanet users 15410 2009-06-02 21:39 license.txt drwx------ 3 vmplanet users 4096 2008-06-19 15:24 .local drwx------ 3 vmplanet users 4096 2009-05-21 18:19 .macromedia drwxr-xr-x 3 vmplanet users 4096 2009-05-21 22:36 .mcop drwx------ 3 vmplanet users 4096 2009-05-28 03:24 .metacity drwxr-xr-x 3 vmplanet users 4096 2009-06-02 02:51 moblock drwxr-xr-x 4 vmplanet users 4096 2008-06-19 15:25 .mozilla drwx------ 3 vmplanet users 4096 2009-05-19 10:35 .ooo-2.0 drwx------ 10 vmplanet users 4096 2009-05-29 23:13 .opera -rwxr-xr-x 1 vmplanet users 368498 2009-05-31 22:38 patch-2.6.29.4 -rw-r--r-- 1 vmplanet users 45514 2009-05-21 22:49 photo_1226012077.jpg -rw-r--r-- 1 vmplanet users 1028 2008-06-19 15:23 .profile drwxr-xr-x 2 vmplanet users 4096 2008-06-19 15:23 public_html drwxr-xr-x 7 vmplanet users 4096 2004-06-25 05:12 qsynaptics drwxr-xr-x 2 vmplanet users 4096 2009-06-02 02:48 .qt -rw-r--r-- 1 root root 7638 2009-06-02 21:39 readme.html -rw------- 1 vmplanet users 325 2009-05-19 10:35 .recently-used -rw-r--r-- 1 vmplanet users 2071 2009-05-27 20:55 .recently-used.xbel drwxr-xr-x 2 vmplanet users 4096 2009-05-21 23:04 .skel drwx------ 4 vmplanet users 4096 2009-05-21 23:09 .thumbnails drwxr-xr-x 2 vmplanet users 4096 2009-05-21 23:04 .wapi -rw-r--r-- 1 root root 40271 2009-06-02 21:39 wp-app.php -rw-r--r-- 1 root root 220 2009-06-02 21:39 wp-atom.php -rw-r--r-- 1 root root 274 2009-06-02 21:39 wp-blog-header.php -rw-r--r-- 1 root root 3424 2009-06-02 21:39 wp-comments-post.php -rw-r--r-- 1 root root 238 2009-06-02 21:39 wp-commentsrss2.php -rw-r--r-- 1 root root 2497 2009-06-02 21:39 wp-config-sample.php -rw-r--r-- 1 root root 1242 2009-06-02 21:39 wp-cron.php -rw-r--r-- 1 root root 220 2009-06-02 21:39 wp-feed.php -rw-r--r-- 1 root root 1986 2009-06-02 21:39 wp-links-opml.php -rw-r--r-- 1 root root 2004 2009-06-02 21:39 wp-load.php -rw-r--r-- 1 root root 19738 2009-06-02 21:39 wp-login.php -rw-r--r-- 1 root root 6932 2009-06-02 21:39 wp-mail.php -rw-r--r-- 1 root root 487 2009-06-02 21:39 wp-pass.php -rw-r--r-- 1 root root 218 2009-06-02 21:39 wp-rdf.php -rw-r--r-- 1 root root 316 2009-06-02 21:39 wp-register.php -rw-r--r-- 1 root root 220 2009-06-02 21:39 wp-rss2.php -rw-r--r-- 1 root root 218 2009-06-02 21:39 wp-rss.php -rw-r--r-- 1 root root 18695 2009-06-02 21:39 wp-settings.php -rw-r--r-- 1 root root 3434 2009-06-02 21:39 wp-trackback.php -rw------- 1 vmplanet users 313 2009-06-02 02:47 .Xauthority -rw-r--r-- 1 vmplanet users 193 2009-05-21 23:15 .xcompmgrrc -rw-r--r-- 1 vmplanet users 1940 2008-06-19 15:23 .xim.template drwxr-xr-x 2 vmplanet users 4096 2008-06-19 15:24 .xine -rwxr-xr-x 1 vmplanet users 1446 2008-06-19 15:23 .xinitrc.template -rw-r--r-- 1 root root 92428 2009-06-02 21:39 xmlrpc.php -rw------- 1 vmplanet users 133929 2009-06-02 22:49 .xsession-errors -rw-r--r-- 1 vmplanet users 262968 2009-05-30 17:52 .y2log -rw-r--r-- 1 vmplanet users 282 2009-05-30 17:30 .y2usersettings |
and the directory the extracted file is in is /home/vmplanet/ipblock/iplist-0.26
|
sorry is this what you needed
opensuse-vm:/home/vmplanet #ls -al cp iplist0.26 /usr/src/*/SOURCES ls: cannot access cp: No such file or directory ls: cannot access iplist0.26: No such file or directory /usr/src/packages/SOURCES: total 10216 drwxrwxrwt 2 root root 4096 2009-06-02 21:05 . drwxr-xr-x 7 root root 4096 2008-06-10 07:15 .. -rw-r--r-- 1 root root 21701 2009-06-02 19:48 flashplayer-installer -rw-r--r-- 1 root root 397 2009-06-02 19:48 index.php -rw-r--r-- 1 root root 10131640 2009-06-02 19:48 libflashplayer.so -rw-r--r-- 1 root root 15410 2009-06-02 19:48 license.txt -rw-r--r-- 1 root root 7638 2009-06-02 19:48 readme.html -rw-r--r-- 1 root root 40271 2009-06-02 19:48 wp-app.php -rw-r--r-- 1 root root 220 2009-06-02 19:48 wp-atom.php -rw-r--r-- 1 root root 274 2009-06-02 19:48 wp-blog-header.php -rw-r--r-- 1 root root 3424 2009-06-02 19:48 wp-comments-post.php -rw-r--r-- 1 root root 238 2009-06-02 19:48 wp-commentsrss2.php -rw-r--r-- 1 root root 2497 2009-06-02 19:48 wp-config-sample.php -rw-r--r-- 1 root root 1242 2009-06-02 19:48 wp-cron.php -rw-r--r-- 1 root root 220 2009-06-02 19:48 wp-feed.php -rw-r--r-- 1 root root 1986 2009-06-02 19:48 wp-links-opml.php -rw-r--r-- 1 root root 2004 2009-06-02 19:48 wp-load.php -rw-r--r-- 1 root root 19738 2009-06-02 19:48 wp-login.php -rw-r--r-- 1 root root 6932 2009-06-02 19:48 wp-mail.php -rw-r--r-- 1 root root 487 2009-06-02 19:48 wp-pass.php -rw-r--r-- 1 root root 218 2009-06-02 19:48 wp-rdf.php -rw-r--r-- 1 root root 316 2009-06-02 19:48 wp-register.php -rw-r--r-- 1 root root 220 2009-06-02 19:48 wp-rss2.php -rw-r--r-- 1 root root 218 2009-06-02 19:48 wp-rss.php -rw-r--r-- 1 root root 18695 2009-06-02 19:48 wp-settings.php -rw-r--r-- 1 root root 3434 2009-06-02 19:48 wp-trackback.php -rw-r--r-- 1 root root 92428 2009-06-02 19:48 xmlrpc.php |
sorry billymayday typed the wrong thing in this is what it gave me
total 12 lrwxrwxrwx 1 root root 19 2009-06-01 01:52 linux -> linux-2.6.25.20-0.1 drwxr-xr-x 22 root root 4096 2009-06-01 01:51 linux-2.6.25.20-0.1 drwxr-xr-x 3 root root 4096 2009-06-01 01:51 linux-2.6.25.20-0.1-obj lrwxrwxrwx 1 root root 23 2009-06-01 01:52 linux-obj -> linux-2.6.25.20-0.1-obj drwxr-xr-x 7 root root 4096 2008-06-10 07:15 packages |
What does
ls -l /usr/src/packages show? Hint - show the command with your post response so it's clear to us what command you were using, e.g. Code:
# ls -l /usr/src/redhat |
opensuse-vm:/home/vmplanet/desktop # ls -l /usr/src/packages
total 20 drwxrwxrwt 2 root root 4096 2008-06-06 14:28 BUILD drwxrwxrwt 8 root root 4096 2008-06-10 07:15 RPMS drwxrwxrwt 2 root root 4096 2009-06-02 21:05 SOURCES drwxrwxrwt 2 root root 4096 2008-06-06 14:28 SPECS drwxrwxrwt 2 root root 4096 2008-06-06 14:28 SRPMS |
All times are GMT -5. The time now is 08:49 PM. |