Hi All,
I'm a rookie using HPUX and I know this is going to sound like a bonehead question, but when I list the contents of a directory, how can I determine which objects are files and which are folders? I'm using the ll and ls commands to lists the contents. So far I've been determining the... (6 Replies)
I have to read a complete folder and if it is a file older that 7 days I have to copy it elsewhere and if it is a folder nothing to make.
The way I do it:
for I in `find /home/. -name "*" -mtime +7`
do
cp -Rf $I /home/elsewhere/.
done
Am I okay with the way I want to do it?
Help... (3 Replies)
Hi All,
I am new to this unix stuff.I just have one doubt:suppose i have two tar files and sometimes it happens that when we just check these files from outside these two tar files look same
"Eg:
ls -lrt
drw-r--r-- 1 oasis logadmin 37067 Apr 3 05:48 file1.tar
drw-r--r-- 1 oasis ... (7 Replies)
Hi,
I want to differentiate between a MS Word and Excel file in Unix (not by extension). The condition which we are currently checking for is the pattern "\320\317\021\340" within first 40 bytes of the file. However this format is same in all MS Office files. Can somebody tell me any special... (4 Replies)
Hi -
Here's the problem I'm encountering......My script logs in to remote FTP through password-less "sftp" and must get the list of sub-directories under a given path. I know many of the unix commands don't work in "sftp" login so I cannot know which one is a "directory" and which one is a... (2 Replies)
how to differentiate between two machine in Unix,whether it is logged in from local machine or from Server( both may be 2 or more).
Please help. (5 Replies)
Im using code below comparing and getting the diff of two files.
But what about multiple files? can you help me guys
diff -u file1 file2|sed -n '/^---/!{/^-/s/-//p}'
diff -ui file1 file2| sed -n '/^++/!{/^+/s/+//p}'
Example
File1:
aaa
bbb
ccc
ddd
File2:
bbb
eee (5 Replies)