Common linux commands for File Processing
Command name: touch
Path:/bin. touch
Execution permission: All Users
Oot @ localhost tmp] # touch list.txt [root @ localhost tmp] # touch/root/list.txt [root @ localhost tmp] # touch program files [root @ localhost tmp] # ll total 52drwxr-xr-x 2 root 4096 12-01 china-rw-r -- 1 root 0 12-01 filesdrwx ------ 3 root 4096 11-30 gconfd-root-rw ------- 1 root 630 12-01 grub. confdrwx ------ 2 root 4096 11-30 keyring-n4KWUI-rw-r -- r -- 1 root 0 12-01 list.txt srwxr-xr-x 1 root 0 11-30 mapping-rootdrwx ------ 2 root 4096 12-01 orbit-root-rw-r -- 1 root 0 12-01 program-rw-r -- 1 root 5 12- 01 scim-bridge-0.3.0.lockfile-0 00 @ localhost: 0.0srwxr-xr-x 1 root 0 11-30 20:10 scim-bridge-0.3.0.socket-0 @ localhost: 0.0srw ------- 1 root 0 11-30 :16 16 scim-helper-manager-socket-rootsrw ------- 1 root 0 11-30 :16 16 scim-panel-socket: 0-rootsrw ------- 1 root 0 11-30 scim-socket-frontend-rootdrwx ------ 2 root 4096 11-30 ssh-mibWGs4219drwx ------ 2 root 4096 11-30 virtual-root.tyft1adrwxr-xr-x 2 root 4096 11-30 vmware-config0drwxrwxrwt 4 root 4096 11-30 VMwareDnDdrwxr-xr-x 2 root 4096 11-30 vmware-rootdrwx ------ 2 root 4096 11-30 vmware-root-2083992326 [root @ localhost tmp] # touch "profile file" [root @ localhost tmp] # lschinafilesgconfd-rootgrub.confkeyring-n4KWUIlist.txtmapping-rootorbit-root profile fileprogramscim-bridge-0.3.0.lockfile-0 @ localhost: 0.0scim-bridge-0.3.0.socket-0 @ localhost: 0.0scim-helper-manager-socket-rootscim-panel-socket: Sources [root @ localhost tmp] #
Command name: cat
Command path:/bin/cat
Execution permission: All Users
[root@localhost tmp]# cat /etc/issueRed Hat Enterprise Linux Server release 5.4 (Tikanga)Kernel \r on an \m[root@localhost tmp]# cat -n /etc/issue 1 Red Hat Enterprise Linux Server release 5.4 (Tikanga) 2 Kernel \r on an \m 3[root@localhost tmp]#
Command name: tac
Path:/usr/bin/tac
[Root @ localhost tmp] # cat/etc/issueRed Hat Enterprise Linux Server release 5.4 (Tikanga) kernel \ r on an \ m [root @ localhost tmp] # cat-n/etc/issue 1 Red Hat Enterprise Linux Server release 5.4 (Tikanga) 2 Kernel \ r on an \ m 3 [root @ localhost tmp] # [root @ localhost tmp] # tac/etc/issueKernel \ r on an \ mRed Hat Enterprise Linux Server release 5.4 (Tikanga) [root @ localhost tmp] # tac-n/etc/issuetac: Invalid Option -- N. Please execute "tac -- help" to obtain more information.
Command name: more can only go down
Path:/bin/more
Space f q
Command name: less
Page UP (to the previous page)
Collect
[root@localhost tmp]# less /etc/services
Command name: head, tail
[root@localhost tmp]# head /etc/services # /etc/services:# $Id: services,v 1.42 2006/02/23 13:09:23 pknirsch Exp $## Network services, Internet style## Note that it is presently the policy of IANA to assign a single well-known# port number for both TCP and UDP; hence, most entries here have two entries# even if the protocol doesn't support UDP operations.# Updated from RFC 1700, ``Assigned Numbers'' (October 1994). Not all ports# are included, only the more common ones.[root@localhost tmp]# head -1 /etc/services # /etc/services:[root@localhost tmp]#
[Root @ localhost tmp] # tail-f/etc/services # dynamic changes nimspooler 48001/udp # Nimbus Spoolernimhub 48002/tcp # Nimbus Hubnimhub 48002/udp # Nimbus Hubnimgtw 48003/tcp # nimbus Gatewaynimgtw 48003/udp # Nimbus Gatewaycom-bardac-dw 48556/tcp # com-bardac-dwcom-bardac-dw 48556/udp # com-bardac-dwiqobject 48619/tcp # iqobjectiqobject 48619 /udp # iqobject
Command name: ln
Hard links can be synchronously updated, but cannot boast of partitions, and cannot be used to create hard links for directories.
[Root @ localhost tmp] # ln-s/etc/issue/tmp/issue. soft [root @ localhost tmp] # ln/etc/issue/tmp/issue. hard [root @ localhost tmp] # ln-l/etc/issueln: Invalid option -- l Please execute "ln -- help" for more information. [Root @ localhost tmp] # ls-l/etc/issue-rw-r -- 2 root 74 2009-08-04/etc/issue [root @ localhost tmp] # ls-l /tmp/issue *-rw-r -- 2 root 74 2009-08-04/tmp/issue. hardlrwxrwxrwx 1 root 10 12-01 14:36/tmp/issue. soft->/etc/issue [root @ localhost tmp] # [root @ localhost tmp] # ls-I/etc/issue/tmp/issue. soft/tmp/issue. hard 1573051/etc/issue 1573051/tmp/issue. hard 917638/tmp/issue. soft [root @ localhost tmp] #