Articles in Commands & Shells
to move /opt on new partition (disk or file system)
1) from system prompt: format –> partition –> label
2) newfs -v /dev/dsk/c0t1d0s1 (target location)
3) mkdir /new_dir
4) mount /dev/dsk/c0t1d0s1 /new_dir
5) cd /new_dir
6) ufsdump 0f – /opt | …
In this example we use the tar command to copy the contents of the /export/home directory to /temphome. This particular syntax forgoes the creation of an actual tarball file. This can be useful if you …
Here’s the correct way to page four commands so they’re all controlled by “more”:
?View Code BASH(date; netstat -i; whodo; ps -ef) | more
Bookmark on Delicious Digg this post Recommend on Facebook share via Reddit …
Here is a quick example showing how to count users logged in on a particular date using the “last” command on Linux.
?View Code BASHtruss -vlstat -tlstat ls -l [file name]
Bookmark on Delicious Digg this post Recommend on Facebook share via Reddit Share with Stumblers Tweet about it Subscribe to the comments on this post
The Unix tar command creates an archive of files and directories while preserving directory structure, file permissions and ownership information. This command is ideally suited for creating backups of most types of data. Many open-source …
isainfo -v
Bookmark on Delicious Digg this post Recommend on Facebook share via Reddit Share with Stumblers Tweet about it Subscribe to the comments on this post
share -F nfs -o ro,anon=0 /cdrom/cdrom0
mount -o ro server:/cdrom/cdrom0 /cdrom
if target server responds: RPC: Program not registered
do
/etc/init.d/nfs.server start
Bookmark on Delicious Digg this post Recommend on Facebook share via Reddit Share with Stumblers Tweet about …
?View Code BASH<em>pattern matching and processing </em>
<strong>awk ‘pattern {action}’ filename </strong>
reads one line at a time from file, checks for pattern match, performs action if pattern matched <em>pattern</em>
NR is a special awk variable meaning the …
find /full_source_path -depth -print | cpio -pudm /full_target_path
Bookmark on Delicious Digg this post Recommend on Facebook share via Reddit Share with Stumblers Tweet about it Subscribe to the comments on this post
Pipe in Unix is a method of passing information from one command to another. The pipe take the output of the first command and sends it as input for the second command. The a second …
tar cvf – . | gzip > target.tar.gz
Bookmark on Delicious Digg this post Recommend on Facebook share via Reddit Share with Stumblers Tweet about it Subscribe to the comments on this post


