Run command from remote server (NIS)

Syntax:
ssh -q “command”

Example:

#ssh -q server1 “lsuser -f username | grep account_locked”

Advertisements

Filtered Deletion

Method 1

# ls -lrt | sed -n ‘/Sep 30/p’ | awk ‘{print $9}’ > sg1.tmp

# rm -rf `cat sg1.tmp`

########################
Method 2

# ls -lrt | sed -n ‘/Sep 30/p’ | awk ‘{print $9}’ | xargs rm

########################

Method 3:
(In current directory)

# find . -name ‘spam-*’ | xargs rm

or

# find . -name ‘*’ | xargs rm