cp doesnt work - Help


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers cp doesnt work - Help
# 15  
Old 01-04-2007
Quote:
Originally Posted by rudi.okelly
Anything in particular I should look for?
That should cleanup scripts/process Smilie
# 16  
Old 01-04-2007
Code:
/bmunix/data/branch00/spool>cp /bmunix/data/branch00/spool/lst01d.dat /bmunix/data/branch00/spool/solstc.dat
/bmunix/data/branch00/spool>echo $?
0
/bmunix/data/branch00/spool>find . -name 'sol*' -ls
/bmunix/data/branch00/spool>

Nothing.

Can't find any clean up scripts as well.
# 17  
Old 01-04-2007
first check whether the folder has any attributes set among using getfacl , lsattr, or the owner of the file
this case generally observed when we are working with temp group using the newgrp command
the file create under this may not work properly, kindly check it
# 18  
Old 01-04-2007
Quote:
Originally Posted by maheshwin
first check whether the folder has any attributes set among using getfacl , lsattr, or the owner of the file
this case generally observed when we are working with temp group using the newgrp command
the file create under this may not work properly, kindly check it
Code:
/bmunix/data/branch00>getfacl -d spool

# file: spool
# owner: bmuser
# group: bmgroup
/bmunix/data/branch00>getfacl -a spool

# file: spool
# owner: bmuser
# group: bmgroup
user::rwx
group::rwx              #effective:rwx
mask:rwx
other:rwx
/bmunix/data/branch00>

# 19  
Old 01-04-2007
Quote:
Originally Posted by rudi.okelly
Code:
/bmunix/data/branch00>getfacl -d spool

# file: spool
# owner: bmuser
# group: bmgroup
/bmunix/data/branch00>getfacl -a spool

# file: spool
# owner: bmuser
# group: bmgroup
user::rwx
group::rwx              #effective:rwx
mask:rwx
other:rwx
/bmunix/data/branch00>




do one thing try to use dd command to check whether is redirecting or not
dd if=/file of=/file bs=4
or
it its working then the problem with cp binary

Last edited by maheshwin; 01-04-2007 at 06:31 AM..
# 20  
Old 01-04-2007
Code:
/bmunix/data/branch00/spool>ls sol*
sol*: No such file or directory
/bmunix/data/branch00/spool>cp lst01d.dat solstc.dat
/bmunix/data/branch00/spool>ls sol
sol: No such file or directory
/bmunix/data/branch00/spool>dd if=lst01d.dat of=solstc.dat bs=4
97618+1 records in
97618+1 records out
/bmunix/data/branch00/spool>ls solstc.dat
solstc.dat
/bmunix/data/branch00/spool>

Code:
/bmunix/data/branch00/spool>rm solstc.dat
/bmunix/data/branch00/spool>cat lst01d.dat > solstc.dat
/bmunix/data/branch00/spool>ls -l solstc.dat
-rw-r--r--   1 bmuser   bmgroup   390474 Jan  4 08:44 solstc.dat
/bmunix/data/branch00/spool>

It creates the file using the two commands you jyst gave me, but cp doesn't work.

Last edited by rudi.okelly; 01-04-2007 at 06:47 AM..
# 21  
Old 01-04-2007
Quote:
Originally Posted by rudi.okelly
/bmunix/data/branch00/spool>dd if=/file of=/file bs=4
dd: /file: open: No such file or directory
/bmunix/data/branch00/spool>cat file > fil2
cat: cannot open file
/bmunix/data/branch00/spool>

dd if=your source file of= your dest file bs=4

here source file full path u have to give, but here u will loose the total data of the file if u r giving the destination file name same

Last edited by maheshwin; 01-04-2007 at 07:13 AM..
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Beginner : sftp doesnt work

Hello, I really appreciate any help on this. Have to connect to external server via sftp. Our server is Linux machine Linux our.server.com 3.10.0-514.26.2.el7.x86_64 #1 SMP Tue Jul 4 15:04:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux I generated the keys, put them in /root/.ssh, sent... (3 Replies)
Discussion started by: billy5
3 Replies

2. UNIX for Dummies Questions & Answers

why doesnt it work?

I am trying to print out two fields in a file using awk. So, I have got awk -F '\t' 'NF = 2 {print $1 $2 "]"}' two.txt in a script called what.awk When i run this version like this - ./what.awk then it runs however I want to run the program like this awk -f what.awk two.txt. When I... (8 Replies)
Discussion started by: The undertaker
8 Replies

3. AIX

Vi doesnt work

Hi Guys, I have a strange problem.( AIX 6.1) "vi" is not working at all..Whenever i #vi <anythin> ,, it returns the prompt back. Any clues folks?? (14 Replies)
Discussion started by: muzahed
14 Replies

4. Shell Programming and Scripting

compiler doesnt work

this is my file I have written. // My first C++ program #include <iostream> int main() { std::cout << "Hi there!" << std::endl"; std::cout << "This is my first C++ program" << std::endl"; return(0); } This is the error I get, why? $ g++ first.cpp ksh: g++: not found (1 Reply)
Discussion started by: gustave
1 Replies

5. Shell Programming and Scripting

loop doesnt work

It just does the break...even though the files are not the same... # Compare extracts #========================================== count=0 while (( count < 5 )) do (( count+=1 )) echo "Try $count" file1=$(ls -l /tmp/psjava.xml|... (5 Replies)
Discussion started by: sigh2010
5 Replies

6. AIX

Crontab file doesnt seem to work

Hi all. Could anyone explain me why this simple cron job doesnt work: % whoami system % crontab -l * * * * * /usr/bin/touch /home/system/foo (3 Replies)
Discussion started by: bsddaemon
3 Replies

7. Red Hat

ldapsearch doesnt work.

Hii All, I am using openldap v2.3 on redhat El-4. When i run ldapsearch it returns all the entries. The command runs successfully. But when I run the ldapsearch with following filter option it doesnt work and immediately returns to the shell. ldapsearch uidNumber>=2000 I've started slapd... (0 Replies)
Discussion started by: shamik
0 Replies

8. HP-UX

ls command doesnt work

Good Day I mistakely renamed the dld.sl file in the /usr/lib directory. When i try to ls/ftp into the box i get this error :eek: crt0: ERROR couldn't open /usr/lib/dld.sl errno:000000002 I have tried to rename it back from the renamed file to the original file name, but it gives me the... (2 Replies)
Discussion started by: shawnbishop
2 Replies

9. UNIX for Dummies Questions & Answers

cd.. doesnt work

hi when i want to go to previous directory by typing cd.. i get the following message $ cd.. ksh: cd..: not found Please help rintingtong (2 Replies)
Discussion started by: rintingtong
2 Replies

10. Shell Programming and Scripting

why doesnt my script work!!!

Is there a utility or command I can use to tell the number of decimal places a number has. For instance, if the number is 432, it will give hundred as the number of decimal places. (7 Replies)
Discussion started by: Heedunk
7 Replies
Login or Register to Ask a Question