| name | ifs |
| description | Browse, search, read, and inspect files in the IBM i Integrated File System (IFS) including authorities, locks, and server shares. Use when user asks about: (1) listing IFS directory contents, (2) searching for files by name or pattern, (3) reading text file contents, (4) checking file authorities or permissions, (5) diagnosing file lock contention, (6) finding large files consuming disk space, (7) viewing NetServer file shares, or (8) replacing WRKLNK, DSPAUT, DSPLNK command output. |
IBM i Integrated File System (IFS) Operations
Browse, search, read, and inspect files in the IFS including authorities, locks, and server shares using QSYS2 SQL services.
Available Tools
The ibmi CLI is the primary tool for IFS operations. Set SKILL_DIR to this skill's installed location (the directory containing this SKILL.md file):
ibmi tools --tools "$SKILL_DIR/tools/" --toolset ifs_default
ibmi tool list_ifs_directory --tools "$SKILL_DIR/tools/" --path /home
ibmi sql "SELECT PATH_NAME, DATA_SIZE FROM TABLE(QSYS2.IFS_OBJECT_STATISTICS(START_PATH_NAME => '/tmp', SUBTREE_DIRECTORIES => 'NO'))"
Service Selection Guide
Browsing & Search
- QSYS2.IFS_OBJECT_STATISTICS -- List directory contents, search by name, find large files
- QSYS2.SERVER_SHARE_INFO -- NetServer file and print shares
Security & Locks
- QSYS2.IFS_OBJECT_PRIVILEGES -- Authority settings for IFS objects
- QSYS2.IFS_OBJECT_LOCK_INFO -- Lock information and job contention
Content
- QSYS2.IFS_READ -- Read text file contents line by line
Key Capabilities
File Browsing
- Directory Listing -- List contents of any IFS directory with type, size, owner
- Recursive Search -- Find files matching name patterns across directory trees
- Large File Detection -- Identify biggest files consuming disk space
Security Analysis
- Authority Review -- Check read/write/execute authorities per user
- Lock Diagnosis -- Identify which jobs hold locks on files
- Owner Information -- Track file ownership across the IFS
Content Access
- Text File Reading -- Read configuration files, logs, scripts
- Share Management -- View NetServer shares and connection counts
Common Use Cases
- Browse directories -- List contents of /home, /tmp, or application paths
- Find files -- Search for configuration files, logs, or specific extensions
- Disk space analysis -- Find largest files in a directory tree
- Authority audit -- Check who has access to sensitive files
- Lock troubleshooting -- Identify jobs blocking file access
- Read config files -- View application configuration or properties files
- Share inventory -- List all NetServer file shares
Quick Examples
List root directory
ibmi tool list_ifs_directory --tools "$SKILL_DIR/tools/" --path /
Search for log files
ibmi tool search_ifs_by_name --tools "$SKILL_DIR/tools/" --path /home --name-pattern '%.log'
Read a text file
ibmi tool read_ifs_file --tools "$SKILL_DIR/tools/" --path /etc/hosts
Check file authorities
ibmi tool get_ifs_object_authorities --tools "$SKILL_DIR/tools/" --path /home/myuser
Pre-built Tools
The tools/ifs.yaml file provides 10 ready-to-use tools:
| Tool | Description |
|---|
list_ifs_directory | List directory contents with type, size, owner |
get_ifs_object_info | Detailed object info including journaling and CCSID |
search_ifs_by_name | Recursive file search by name pattern |
list_ifs_large_objects | Find largest files in a directory tree |
get_ifs_object_authorities | Authority settings for IFS objects |
read_ifs_file | Read text file contents line by line |
list_ifs_object_locks | Lock information for file contention diagnosis |
list_server_shares | NetServer file and print shares |
compare_ifs_objects | Compare attributes and content of two IFS objects |
list_ifs_job_info | IFS file handles held by a specific job |
ibmi tool <tool_name> --tools "$SKILL_DIR/tools/"
ibmi tool <tool_name> --tools "$SKILL_DIR/tools/" --dry-run
ibmi tools show <tool_name> --tools "$SKILL_DIR/tools/"
Reference Documentation