Commands: $ logname  to check present working user. User2 $ clear


Ex: file 21 file34 file 56 LINUX Wild card characters



Download 122.5 Kb.
Page3/17
Date25.10.2023
Size122.5 Kb.
#62396
1   2   3   4   5   6   7   8   9   ...   17
Unix Commands
Ex: file 21 file34 file 56


LINUX Wild card characters
Here are wildcards and regular expressions:
* — Matches all characters
? — Matches one character
\* — Matches the * character
\? — Matches the ? Character
\) — Matches the ) character

  • Displaying Directory Contents

$ ls  To display the present working directory contents.
Options:
$ ls –a  to display all files including hidden files like . (Dot) and .. (Double dot) files
$ ls |pg  to display contents page wise (only UNIX).
$ ls |more  to display contents line by line in UNIX and LINUX.
$ ls –x  to display in width wise.
$ ls –x|more  to display contents width wise and line wise.
$ ls –f  to display only files.
$ ls –F  to display all files including exe files.
$ ls –R  to display including sub directories recursively like tree structure.
$ ls –r  to display in reverse order.
$ ls –d  to display only directories.
$ ls –t  to display based on date and time of creation of files (latest to old files)
$ ls –u  to display based upon last accessed time.
$ ls –s  to display files including number of blocks used by the file and directories.
$ ls –i  to display files including I-node number of files. I-node number provides
information about the files.
$ ls –l  to display long list of the files.
Ex:
$ pwd
/home/user2
$ ls –l
d rwxrw_rw_ 3 user2 group1 5436 feb22 14:00 xxx
_ rw_rw_r__ 2 user2 group1 231 oct21 10:00 file1
In above example First character is the type of the file.
_  Regular File
d  Directory File
c  Character Special File
b  Block Special File
f  FIFO File
s  Socket File
l  Symbolic File
1   2   3   4   5   6   7   8   9   ...   17




The database is protected by copyright ©ininet.org 2024
send message

    Main page