Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Copying all files of type "pdf" Post 3853 by ghoti on Thursday 12th of July 2001 10:26:34 AM
Old 07-12-2001
to be honest you are making it a bit complicated, try just using just the 'cp' command with wildcards.

-gHoTi
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Copying multiple files with "If Then Else" logic

I need some suggestions on how to write the code to copy multiple files rather than duplicating the code multiple times. Example: I have four files that need to go throught this logic in the same way. Do I have to duplicate this chunk of code four times or can I built the logic in the same set... (2 Replies)
Discussion started by: madhunk
2 Replies

2. UNIX for Advanced & Expert Users

Why is wget copying my directory tree with some files with "@"?

I'm using wget 1.11.4 on Cygwin 1.5.25. I'm trying to recursively download a directory tree, which is the root of a javadoc tree. This is approximately the command line I tried: wget -x -p -r http://<host>/.../apidoc When it finished, it seemed like it downloaded... (0 Replies)
Discussion started by: dkarr
0 Replies

3. Shell Programming and Scripting

Delete files older than "x" if directory size is greater than "y"

I wrote a script to delete files which are older than "x" days, if the size of the directory is greater than "y" #!/bin/bash du -hs $1 while read SIZE ENTRY do if ; then find $1 -mtime +$2 -exec rm -f {} \; echo "Files older than $2 days deleted" else echo "free Space available"... (4 Replies)
Discussion started by: JamesCarter
4 Replies

4. Shell Programming and Scripting

"Join" or "Merge" more than 2 files into single output based on common key (column)

Hi All, I have working (Perl) code to combine 2 input files into a single output file using the join function that works to a point, but has the following limitations: 1. I am restrained to 2 input files only. 2. Only the "matched" fields are written out to the "matched" output file and... (1 Reply)
Discussion started by: Katabatic
1 Replies

5. Shell Programming and Scripting

Creating a Shortcut (to just type "l" but it runs "ls -lah")

How do I create shortcuts? For example: I just want to type one key "l" and have it output the command of "ls -lah" I believe it's creating a file called l with 755 permissions but I'm not sure where to put the file. *if it matters, I'm on a shared hosting web server using cPanel with... (2 Replies)
Discussion started by: ijustsawmars
2 Replies

6. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

7. UNIX for Advanced & Expert Users

How to gzip files "on fly" before copying

Hello, I want to gzip some files before copying to remote host. There is no freespace on source host so it needs to be perfomed within one-liner. I tried the following but it didn't work gzip -c -9 all_rvds.xml |ssh targethost "dd of=/tmp/all_rvds.xml.gz" cat all_rvds.xml |gzip -c9 |ssh... (5 Replies)
Discussion started by: urello
5 Replies

8. Shell Programming and Scripting

Delete all log files older than 10 day and whose first string of the first line is "MSH" or "<?xml"

Dear Ladies & Gents, I have a requirement to delete all the log files in /var/log/test directory that are older than 10 days and their first line begin with "MSH" or "<?xml" or "FHS". I've put together the following BASH script, but it's erroring out: for filename in $(find /var/log/test... (2 Replies)
Discussion started by: Hiroshi
2 Replies

9. Shell Programming and Scripting

find . -path "*_nobackup*" -prune -iname "*.PDF" \( ! -name "*_nobackup.*" \)

These three finds worked as expected: $ find . -iname "*.PDF" $ find . -iname "*.PDF" \( ! -name "*_nobackup.*" \) $ find . -path "*_nobackup*" -prune -iname "*.PDF" They all returned the match: ./folder/file.pdf :b: This find returned no matches: $ find . -path "*_nobackup*" -prune... (3 Replies)
Discussion started by: wolfv
3 Replies

10. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies
NSEND(1)							       nsend								  NSEND(1)

NAME
nsend - Send messages to users or groups SYNOPSIS
nsend [ -h ] [ -S server ] [ -U user name ] [ -P password | -n ] [ -C ] [ -a ] -i objectID | -c connNum[,...] | { [ -t recipient type ] -o recipient name | recipient name } message DESCRIPTION
With nsend, you can send messages to the user's workstations. nsend looks up the file $HOME/.nwclient to find a file server, a user name and possibly a password. See nwclient(5) for more information. Please note that the access permissions of .nwclient MUST be 0600, for security reasons. OPTIONS
recipient name recipient name is either the NetWare name of the user to receive the message or the name of an existing user group on that server. You can use wildcards in this specification. -o recipient name Specifies recipient's name. This can specify user or group. -t recipent type Specifies recipient's type. -c connNum[,...] Specifies connection numbers of recipients. You can use this option as workaround to deliver messages to directory services users. -i userID Specifies recipient's object ID. You can use this option as workaround to deliver messages to directory services users. message message is the message to be sent. Please note that this has to be a single command line argument. If you want to send a message that contains spaces, you have to quote them on the command line. For example, to annoy your system administrator, you should try nsend supervisor 'I know how this works!' Program first searches (wildcards allowed) bindery with recipients name and type. If user is found, message is sent to this user, if group is found, message is sent to this group. Other object types are ignored. If no suitable object was found in this phase, connection list for specified object is retrieved (no wildcards allowed) and message is sent to this object (including print servers and so on). No expansions on group is done this time. -a By default, nsend prepends 'From ....' text to message. You can suppress this by adding -a to command line. -S server server is the name of the server you want to use. -U user name If the user name your NetWare administrator gave to you differs from your unix user-id, you should use -U to tell the server about your NetWare user name. -P password You may want to give the password required by the server on the command line. You should be careful about using passwords in scripts. -n -n should be given if specified user does not have password. If neither -n nor -P are given, nsend prompts for a password. -C By default, passwords are converted to uppercase before they are sent to the server, because most servers require this. You can turn off this conversion by -C. BUGS
Directory services connection are not supported yet. Options -c, -i and -o cannot be used together. If user is specified multiple times (using wildcards in group specification or by repeating same number in -c), message is delivered multi- ple times to him. SEE ALSO
nwclient(5), nprint(1), slist(1), ncpmount(8), ncpumount(8) CREDITS
nsend was written by looking at mars_nwe's message handling. Thanks to Martin Stover <mstover@freeway.de>. Support for Netware groups by Philippe Andersson <philippe_andersson@ste.scitex.com>. Support for connections greater than 255 by Petr Vandrovec <vandrove@vc.cvut.cz>. nsend 04/07/1999 NSEND(1)
All times are GMT -4. The time now is 02:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy